I'm trying to read user-uploaded JPEG image (arbitrary) to create thumbnail in server app. System works just fine in Windows7 / Oracle Java 8u11 but I have problem with color model under CentOS on server:
original image is:
http://studio-st.ru/media/portfolio/image/45
resulting thumbnail on development workstation under Windows is absolutely correct
result under Linux is color-shifted (reddish on Java 8u05, color-shifted on Java 8u11). Not presented here because original example was on site, which is fixed now.
Deeper investigation shown that problem is in reading image - ImageIO.read(inputStream) on Windows and Linux return image objects with exactly the same parameters, however color probe getRGB(x,y) for the same image (just read) returns different values.
Colors treating in Linux differ on Java 8u05 & 8u11, 8u05 was "reddish", 8u11 is as shown above.
This has nothing to do with alpha channels - this particular source image is JPEG Type 5 (TYPE_3BYTE_BGR), exported from Adobe Lightroom with conversion to sRGB, without any other tricks.
This also affects all images exported that time (all images on this site, in fact).
Can anyone provide some advice on how to make it work (except for waiting for fix for JDK)? Maybe recommend alternate library, which can be used here (EJB, data stored in MongoDB, so data is fetched using InputStreams - no filesystem access).
Thanks!
UPD: issue appears to be with Java8's new Color Management Module - it doesn't understand this image format. Switching to legacy CMM fixed the issue. Please see details in correct comment below.