Code Monkey home page Code Monkey logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024 2
Note
------
Use of "TwelveMonkeys ImageIO" fixes this particular issue.
https://github.com/haraldk/TwelveMonkeys

(Thank you for the tip, marcus!)

Original comment by [email protected] on 21 Sep 2014 at 10:41

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
Thank you for reporting this issue along with a supplemental link.

I have been able to reproduce this issue with Thumbnailator 0.4.2, and it does 
indeed appear to be a problem with the JPEG reader that is being used by Image 
I/O.

I will look into the link in a little more detail at a later time, but I would 
like to see if there are other ways of implementing a workaround rather than 
having to write an alternate JPEG reader to the one that is provided with Java.

(Image I/O does indeed have many outstanding bugs which have not been addressed 
for close to a decade...)

Once again, thank you for the detailed report.

------------------

The following is the stack trace on Ubuntu 12.04 with Oracle JDK 1.7.0_04:

  Exception in thread "main" javax.imageio.IIOException: Unsupported Image Type
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:995)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:966)
    at javax.imageio.ImageReader.read(ImageReader.java:940)
    at net.coobird.thumbnailator.tasks.io.FileImageSource.read(FileImageSource.java:144)
    at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.read(SourceSinkThumbnailTask.java:76)
    at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Thumbnailator.java:62)
    at net.coobird.thumbnailator.Thumbnails$Builder.toFile(Thumbnails.java:2409)
    at Issue40.main(Issue40.java:15)


The following is the stacktrace on Ubuntu 12.04 and OpenJDK 1.6.0_24:

  Exception in thread "main" javax.imageio.IIOException: Incompatible color conversion
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkColorConversion(JPEGImageReader.java:927)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1028)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:984)
    at javax.imageio.ImageReader.read(ImageReader.java:940)
    at net.coobird.thumbnailator.tasks.io.FileImageSource.read(FileImageSource.java:144)
    at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.read(SourceSinkThumbnailTask.java:76)
    at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Thumbnailator.java:62)
    at net.coobird.thumbnailator.Thumbnails$Builder.toFile(Thumbnails.java:2409)
    at Issue40.main(Issue40.java:15)

Original comment by [email protected] on 11 Nov 2012 at 12:17

  • Changed state: Accepted

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
Yes I guess the ideal would be to submit a patch to the JDK:

http://openjdk.java.net/contribute/

for bug

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5100094

Unfortunately I myself haven't the time to work towards that at the moment.

Original comment by [email protected] on 11 Nov 2012 at 2:18

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
Adding a link to a question on StackOverflow regarding reading CMYK JPEG images 
using Java Image I/O:

http://stackoverflow.com/questions/2408613/problem-reading-jpeg-image-using-imag
eio-readfile-file

Original comment by [email protected] on 16 Jul 2013 at 3:38

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
FYI: You can workaround this issue by using JPEGImageReader from 

https://github.com/haraldk/TwelveMonkeys

Original comment by [email protected] on 24 Oct 2013 at 8:27

from thumbnailator.

Paper-Folding avatar Paper-Folding commented on May 28, 2024

I encountered the same problem, if converting image to rgb via photoshop, the problem disappears.

from thumbnailator.

coobird avatar coobird commented on May 28, 2024

Support for CMYK JPEGs would require writing a JPEG reader that supports it, which is outside the scope of Thumbnailator. (Thumbnailator is a wrapper around the Java 2D and Image I/O APIs.)

TwelveMonkeys ImageIO provides an excellent alternative to Java's default JPEG reader/writer, which can deal with CMYK JPEGs

from thumbnailator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.