Skip to content

Exception reading a CMYK Jpeg #40

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Generate a CMYK JPG, call it selectedFile
1. Run Thumbnails.of(selectedFile).size(500, 500).toFile(thumb500File);

What is the expected output? What do you see instead?

Expected output - thumb500File created normally

Actual output: Exception raised "Incompatible color conversion"

What version of the product are you using? On what operating system? Which
version of Java (Sun/Oracle? OpenJDK?) ?

OpenJDK 7u9, Ubuntu Linux

Please provide any additional information below.

The core Java method ImageIO.read produces exactly the same exception, e.g.

BufferedImage originalImage = ImageIO.read(selectedFile);

so it looks like the issue is with Java, however other people have found 
workarounds - 
http://www.randelshofer.ch/blog/2011/08/reading-cmyk-jpeg-images-with-java-image
io/

Would it be possible to implement a workaround in Thumbnailator too? I think 
the Java issue dates back some time.

A sample JPG exhibiting the problem is attached.

Original issue reported on code.google.com by oliver.k...@gmail.com on 1 Nov 2012 at 12:59

Attachments:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions