Open GoogleCodeExporter opened 8 years ago
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 coobird...@gmail.com
on 11 Nov 2012 at 12:17
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 oliver.k...@gmail.com
on 11 Nov 2012 at 2:18
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 coobird...@gmail.com
on 16 Jul 2013 at 3:38
FYI: You can workaround this issue by using JPEGImageReader from
https://github.com/haraldk/TwelveMonkeys
Original comment by marcus.l...@googlemail.com
on 24 Oct 2013 at 8:27
Note
------
Use of "TwelveMonkeys ImageIO" fixes this particular issue.
https://github.com/haraldk/TwelveMonkeys
(Thank you for the tip, marcus!)
Original comment by coobird...@gmail.com
on 21 Sep 2014 at 10:41
The Thumbnailator project will move to GitHub due to the Google Project Hosting
going read-only in one month.
http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
This issue has been migrated to GitHub at the following URL:
https://github.com/coobird/thumbnailator/issues/40
Original comment by coobird...@gmail.com
on 25 Jul 2015 at 10:58
Original issue reported on code.google.com by
oliver.k...@gmail.com
on 1 Nov 2012 at 12:59Attachments: