Converted PDF cannot open in Acrobat #175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I run the following command with the attached jpg file.
python3 src/img2pdf.py -v -o output.pdf 001.jpg
However, when attempting to open the resulting PDF (output.pdf) in Acrobat, an error message stating “Insufficient data for an image” is displayed.
Upon further investigation with exiftools, I found that the image file contains only one component, but the ‘Color Space Data’ is mentioned as RGB. Is it possible that this inconsistency is causing Acrobat to fail in opening the PDF file?
Thanks.
A grayscale image with an RGB color profile seems to be the problem, which appears to be similar to issue #164. This particular image was generated using an older version( 2.2.6) of “SmartAlbums”.
Do you think it safe to exclude the ICC profile on a grayscale JPG file? If it's not that safe, I can also create a patch which verifies the “Software” metadata from the EXIF first before discarding the ICC profile.
Could you try img2pdf from git? This bug should be fixed there.
I just have to make a new release but the test suite still fails on Fedora...
Hi Josch,
I tried the head version and since this issue is a little different to #164, it's not fixed.
The following patch could fix it. Could you please review it? As I commented above, pictures with Software properties of 'SmartAlbums' in EXIF are covered. If you think it is also common or it's a safe patch, we could remove that part.
Regards
Leo
You are completely correct! The other fix was about TIFF and PNG produced by GIMP. Your problem is about JPEG produced by SmartAlbums but the fix is the same. I didn't even know that grayscale JPEGs were possible. I modified your patch a bit:
What should I put as name and email for the
Author
field of that commit?Thank you for your confirmation. Leo leozhu8964@gmail.com is fine. Thanks.
Found another case. Images were created with PhotoShop.
uff... why do all these image manipulation programs put an RGB profile into a grayscale image? :(
Are these also JPEGs? What is the value of the Software tag?
History Software Agent : Adobe Photoshop CS6 (Windows), Adobe Photoshop 23.0 (Windows)
Software : Adobe Photoshop 23.0 (Windows)
Seems the attachments are not displaying.
https://www.dropbox.com/sh/5xq6kllf1ormjkm/AACx6kw1vXr2-rOonngxEYPia?dl=0
i merged your MR, thank you!