[MGNLIMG-106] Imaging does not work with JPEG images with CMYK color profile Created: 13/Feb/13  Updated: 05/Apr/17  Resolved: 17/Aug/15

Status: Closed
Project: Imaging
Component/s: image operations
Affects Version/s: 2.2.1, 2.2.2
Fix Version/s: 3.1.5-java7

Type: Improvement Priority: Critical
Reporter: Frank Sommer Assignee: Evzen Fochr
Resolution: Workaround exists Votes: 3
Labels: None
Remaining Estimate: 0d
Time Spent: 1.75h
Original Estimate: Not Specified

Attachments: JPEG File abc.jpg    
Issue Links:
Relates
relates to MGNLIMG-142 Replace removed JPEG classes in Java 7 Closed
relates to MGNLIMG-136 Images render in wrong colors with Ja... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Story Points: 1

 Description   

If you add the attached image to a page, the image will not displayed through the imaging module. Without imaging module it would.

It seems that the SunJPEGCodecImageDecoder could not handle with those images.

Workaround: Convert images to RGB color space before importing them into Magnolia.



 Comments   
Comment by Magnolia International [ 02/May/13 ]

May or may not be related, but we had a bunch of color/compression/alpha layer issues - and I'm wondering if they could be related to color profiles. Reading http://www.color.org/version4html.xalter is what led me to think about this. (compare this page with Safari and Firefox)

Comment by Christopher Zimmermann [ 02/Oct/14 ]

Could be helpful:
http://stackoverflow.com/questions/3123574/how-to-convert-from-cmyk-to-rgb-in-java-correctly

Comment by Jan Haderka [ 14/Jul/15 ]

after replacement of sun private classes with equivalent from 12monkeys library, new version of imaging doesn't have the issue. See MGNLIMG-142 for details.

Comment by Evzen Fochr [ 17/Jul/15 ]

Backported code is not compatible with java 1.6, we need to release it separately for support if needed.

Comment by Federico Grilli [ 27/Jul/15 ]
  • ImagingServlet.java
    • to avoid breaking binary compatibility I'd keep the old c-tor and deprecate it, then create a new one taking ImagingModuleConfig. The old c-tor can get the latter object internally via Components
  • imo SunJPEGCodecImageDecoder and SunJPEGCodecImageDecoderAlt should't be removed in a maintenance release. I'd add some note in their javadoc concerning this issue and advising ppl not to use them anymore. Same should go for documentation.
Comment by Evzen Fochr [ 30/Jul/15 ]

I am afraid that my CMYK picture is nor rendered on page after downgrading version to 3.0.2

Comment by Jan Haderka [ 10/Aug/15 ]

Fix is available in git on a branch, but since it requires java 7, we cannot merge this fix on 3.1 branch that is still java 6 compatible. Fix is available already in imaging 3.2 (Magnolia 5.4). If upgrade is not possible, one can work around the issue by first converting image to RGB.

Comment by Milan Divilek [ 17/Aug/15 ]

Closing as "Workaround exists". Patch is available on "magnolia-imaging-3.1.x-java7" branch.

Generated at Mon Feb 12 02:12:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.