When you are using python img2pdf to convert an image to pdf file, this error: Refusing to work on images with alpha channel may occur. In this tutorial, we will introduce how to fix this error and convert an image to pdf successfully.
Why this error occur?
The main reason is this image contains alpha channel, such as transparent.
How to fix this error?
To fix this error, we can remove alpha channel in this image, then we can convert this image easily.
To fix this error, you can view this tutorial, you can remove it step by step.
A Simple Guide to Remove Image Alpha Channel with ImageMagick in Win 10 – ImageMagick Tutorial