Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 4.2.2
-
Fix Version/s: 5.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:JDK 1.7, 1.8 or Open JDK
-
ICEsoft Forum Reference:
-
Support Case References:Support Case #12663 - https://icesoft.my.salesforce.com/5007000000ZwVJy
Description
We've been using com.sun.image.codec.jpeg.JPEGCodec do do some funky JPEG image detection/loading since the 1.x days. The day has finally come where Oracle has removed the class which has always been a concern for a com.sun package.
It would be fairly easy to rewrite the JPEGCodec code with something in ImageIO or JAI. ImageIO wasn't always a possibility for us as we used to be JDK 1.3 compliant. There are also some older image libraries like http://java.sun.com/products/jimi/ and http://incubator.apache.org/sanselan/site/index.html that may offer a similar feature set.
It would be fairly easy to rewrite the JPEGCodec code with something in ImageIO or JAI. ImageIO wasn't always a possibility for us as we used to be JDK 1.3 compliant. There are also some older image libraries like http://java.sun.com/products/jimi/ and http://incubator.apache.org/sanselan/site/index.html that may offer a similar feature set.
A bunch of small fixes have gone into this in the last few days and I'm feeling the imaging is once again stable. One of the last major issue was related to the installation of the JAI on a particular JDK. When installed the following native ImageReaders are installed.
com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLib
com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReade
The problem with these readers is that they can't handle getting the image as a raster. The good news is that a call to canReadRaster() can test for and ignore these readers.
One of the cool side effects of moving to an more or less pure ImageIO implementation is that other JPEG deocders can be used. This should be useful for the Linux crowd. In my testing the twelvemonkeys API worked very well added to the class path. The following jars are required.
twelvemonkeys-common-image-3.0.jar
twelvemonkeys-common-io-3.0.jar
twelvemonkeys-common-lang-3.0.jar
twelvemonkeys-common-core3.0.jar
twelvemonkeys-common-jpeg-3.0.jar
twelvemonkeys-common-metadata-3.0.jar