w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Java 8 ImageIO reads JPEG incorrectly in Linux

You could try using my JPEGImageReader plugin for ImageIO, it handles color conversions a little bit differently than the default JPEGImageReader, so it might help (sorry, don't have my work computer near, so I can't test myself just now). If it doesn't help, I'd like to fix it. Can I use your image for a test case? :-)

Another thing that might help, is specifying:

-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider

on the command line (or set the sun.java2d.cmm system property accordingly using other means). The color management module (CMM) was switched from Sun/Kodak's legacy CMM to the more up-to-date and open-source Little CMS in Java 8. Setting this system property will re-enable the legacy color management from Java pre 8.

As you mention no disk access, it pretty much rules out JMagick or im4j as these works best with files. It would probably be possible to use temp files though.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.