myollie / img2pdf

losslessly convert images to pdf
58 stars 6 forks source link

Image format support list #4

Closed Ami-OS closed 1 year ago

Ami-OS commented 2 years ago

Hi, when I put the .avif image to the command line, I got the:

ERROR:root:error: cannot read input image (not jpeg2000). PIL: error reading image: cannot identify image file <_io.BytesIO object at 0x7f95c7332090>

But the .webp format is supported.

So, what image format is img2pdf support? (I need a list to convert any images that img2pdf won't support.)

I'm grateful.

devnoname120 commented 1 year ago

It supports JPEG2000 + all the formats that Pillow supports: https://github.com/myollie/img2pdf/blob/ff6216cf641e21e70619ac18a49deca26ff8f4a0/src/img2pdf.py#L670-L678

This depends on the Pillow version that your local installation uses.

Ami-OS commented 1 year ago

Thx