Comments (7)
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.
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.
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.
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.
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.
I encountered the same problem, if converting image to rgb via photoshop, the problem disappears.
from thumbnailator.
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)
- No suitable ImageReader found for source data(jpeg Picture format) HOT 2
- How to ensure the GIF dynamic effect after compression HOT 1
- Do you have plans to support WebP, AVIF? HOT 1
- Thumbnail not properly generating from PNG images HOT 2
- Image color loss during conversion HOT 3
- Define an Automatic-Module-Name HOT 1
- the image format webp is not support HOT 5
- No suitable ImageReader found for source data errors HOT 1
- After resize the image is rotated HOT 3
- 300dpi tiff image changed to 96pi jpg but pixel does not chage HOT 1
- Incorrect cropping when specifying sourceRegion and an image that has exif orientation HOT 2
- Multi-threaded processing of images with large pixel width and height leads to memory OutOfMemoryError
- the .pict file is not supported HOT 1
- javax.imageio.IIOException: Invalid JPEG file structure: two SOF markers HOT 1
- Add crop method usage to examples HOT 2
- How to make the image width fixed when the image is scaled HOT 1
- Does the thumbnailator support generating thumbnails for png images? HOT 1
- Conversion error caused by image reading failure
- Native image service unable to compress image
- jpg color turn red HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thumbnailator.