These are the known bugs and enhancement requests for the current Java Advanced Imaging 1.0.2 release. They are not in any priority order and we do not promise that all will get fixed before the next release. If a bug listed below is impacting your work with the Java Advanced Imaging API, please let us know so we may prioritize it properly.
To report a bug that is not on this list, please see the
Bug Report instructions.
Java Advanced Imaging API Reference Port Bugs
Reading animated GIF files using the "stream" method, that is, an InputStream is created from a GIF file and sent to the codec classes, results in Exception due to the limitation of Stream.
To work around, read animated GIF files as the following:
The GIF decoder does not handle GIF files with transparent background correctly. It ignores the background value if it's marked as transparent and the image comes out with a black background regardless of the original background index palette entry.
BandCombineDescriptor deals incorrectly with IndexColorModel source images.
When attempting to rotate a TYPE_BYTE_BINARY BufferedImage source, an exception occurs.
In the particular case of "BandSelect", validation methods for the associated OperationDescriptor, the getSampleModel() method, is being invoked on the source image. As the source happens to be a RenderedOp and the sink of the image chains to that point, the chain becomes frozen once getSampleModel() is called. This is as stated in the documentation for RenderedOp which expects the node to be frozen whenever any RenderedImage method is invoked on it.
Any time an OperationDescriptor invokes a RenderedImage method on a RenderedOp source (to validate the arguments), image chains could end up being frozen unexpectedly. One workaround for this would be to create a RenderedOp directly instead of via JAI.create().
Java 2D Bugs Affecting Java Advanced Imaging APINote that all of the following bugs are/will be fixed in the JDK 1.3 beta.
BandedSampleModel.createCompatibleSampleModel() has a bug that causes the offsets of the newly created BandedSampleModel to be incorrect. Consequently, Rasters using BandedSampleModels are unusable in Java Advanced Imaging as the incorrect offsets cause array bounds to be overrun. Use RasterFactory.createBandedSampleModel() to create a SampleModel with Banded characteristics that works with Java Advanced Imaging.
Graphics2D.drawRenderedImage draws a child Raster at an incorrect position. There are no workarounds in JAI for this.
WritableRaster.createWritableChild() does not correctly set child width & height. Workaround in JAI is to use RasterFactory.createWritableChild().
BytePackedRaster.setDataElements throws ArrayIndexOutOfBoundsException. There is no workaround in JAI for this.
BytePackedRaster.get/setDataElements are implemented incorrectly. There is no workaround in JAI for this.
ComponentColorModel.createCompatibleSampleModel sets all band offsets to 0. There is no workaround in JAI for this.
IntegerInterleavedRaster.setDataElements() slow by a factor of 2.5 to 4. No workaround for this.
Java2D displays Grayscale images with alpha values incorrectly. No known workaround.
drawImage does not properly display sub-band child images. The workaround is to copy the desired band to a separate single-band raster and display that.
ColorModel.getRed/Green/Blue/Alpha methods are incorrect for USHORT datatype. No known workaround.
SampleModel subclasses unnecessarily truncate float and double sample values. No known workaround.
The version of SampleModel.getPixels that returns a double throws an ArrayIndexOutOfBoundsException. No known workaround.
ComponentColorModel.isCompatibleSampleModel() returns false with a ComponentSampleModel. No known workaround.
If java.awt.color.ColorSpace.toRGB() returns non-integral values, the ComponentColorModel.get*() methods could produce incorrect results. No known workaround.
IndexColorModel.isCompatibleSampleModel is too restrictive, returns false with a MultiPixelPackedSampleModel. No known workaround.
Additional Problems/Limitations of Note
The ScrollingImagePanel, when used, causes several warnings to come up on the screen. These warnings are thrown by MOTIF on Solaris only and can be safely ignored.
Java Advanced Imaging 1.0 implemented functionality for the TIFF reader and writer that conformed to the TIFF 6.0 Baseline specification. The following limitations are pieces of functionality that may be commonly utilized in TIFFs, but nevertheless are not a part of the official TIFF 6.0 specification and have thus not been supported in Java Advanced Imaging 1.0 or 1.0.2.
TIFF Encoder cannot output images with compressed image data.
TIFF decoder cannot read images stored in Planar format (PlanarConfiguration tag has value 2).
TIFF Encoder cannot output images in Tiled format.