-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMYK image loading with inverted colors #147
Comments
Hi Maciej, Thanks for reporting! Could be something experimental I implemented for not inverting CMYK JPEGs extracted from PDFs... But I'll have to look into it in more detail. If it displays inverted, it's probably a bug, as it seems to display correctly in my browser (Safari/iPad). Right now I'm on summer holiday, but I'll look into it as soon as possible. Regards, Harald K |
Hey! Thanks for the update, enjoy the holidays, you deserve it :). Cheers. |
Okay, found the issue (it was the experimental code I expected). I'll have to revert some code for this to display correctly (and it will break some other images). The main problem here is that CMYK JPEG isn't very strictly defined AFAIK. The "de facto" way is to treat stand-alone CMYK JPEGs as stored inverted, while CMYK JPEG streams inside PDFs are normally stored non-inverted. However this is not always correct... Do you know what software created this image? Is it extracted from a PDF? Regards, Harald K |
Hi Sérgio |
Hi Sérgio, Thanks. Do you have the issue with Maciej's image on 3.0? Please keep in mind that there's (AFAIK) no way to accurately determine if the CMYK JPEG is inverted or not, so some images will be inverted, regardless of version and applying the proposed fix. If you are extracting JPEGs from PDFs, the PDF does contain the necessary information. Harald K |
Fixed in lastest commit. Now all CMYK JPEGs are inverted when read. If someone would like the non-inverted values, they will have to use the I'm planning to add a setting to the Harald K |
Late to the party, but I'm afraid I wouldn't be able to help you - no idea how the client made the jpeg nor have any contact to them. |
@maciejhirsz Ok. Latest master is back to the original code, treating all images the same. The image you attached looks good using this approach. If an image comes out as inverted, it's because the JPEG is stored non-inverted, which should not happen for standalone CMYK JPEGs. Harald K |
I've been using TwelveMonkeys for a while without much of an issue, but of course finally some client managed to fabricate an image that doesn't load quite right, it's the first CMYK image that I see load with inverted colors, and I'm a bit at a loss why...
The JPEG in question to be found here: http://terhix.com/inverted.jpg
ImageMagick
identify -verbose
dump:Tested with TwelveMonkeys 3.1.1.
The text was updated successfully, but these errors were encountered: