Sun Java Solaris Communities My SDN Account Join SDN
 

Java Advanced Imaging API 1.1 Known Bugs/Issues

 
JavaAdvanced Imaging API

 


FAQ | Interest Group


These are the known bugs and enhancement requests for the current Java Advanced Imaging 1.1 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 affecting your work with the Java Advanced Imaging API, please let us know so we may assign it the proper priority.

To report a bug that is not on this list, please see the Bug Report instructions.

Java Advanced Imaging API Reference Port Bugs

These bugs are due to code within JAI itself.

Core Bugs

  • If an ImageLayout hint corresponding to JAI.KEY_IMAGE_LAYOUT is in the RenderingHints set on an operation node, the ImageLayout contains a ColorModel but no SampleModel, and the ColorModel is incompatible with the first source image's SampleModel, then the ColorModel hint will be ignored. A workaround is also to set a SampleModel in the ImageLayout for example as:
        // Variables (initialization omitted)
        RenderedImage src;
        ParameterBlock pb;
        ColorModel cm;

        // Create hints with desired ColorModel and derived SampleModel.
        ImageLayout il = new ImageLayout();
        il.setColorModel(cm);
        il.setSampleModel(cm.createCompatibleSampleModel(src.getTileWidth(),
                                                         src.getTileHeight()));
        RenderingHints rh = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, il);

        // Create the operation.
        RenderedOp dst = JAI.create("affine", pb, rh);

  • KernelJAI never sets the values of the instance variables isHorizontallySymmetric and isVerticallySymmetric. Operator Bugs
    • No known significant bugs at this time.
    Remote Imaging Bugs
    • No known bugs at this time.
    Codec Bugs
    • 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.

    • The BMP, JPEG, and TIFF encoders cannot encode BufferedImages of type BufferedImage.TYPE_INT_RGB. This is due to the encoder interpreting the data as 32 bits per sample. A workaround would be to re-format the image to have 8 bits per sample (for example with a ComponentSampleModel) before encoding. The "format" operator may be used for this purpose.

    • The BMP decoder may not handle certain 16-bit RGB images correctly. When a 16-bit RGB image is loaded, a 888 RGB ColorModel is attached. Workarounds for this include generating a correct ColorModel based on the masks or shifting the data to fill the full 8 bits for each component.

    • When the JVM is terminated abnormally, temporary files created by FileCacheSeekableStream may not be removed. Such files are located in the system-dependent default temporary-file directory discussed in java.io.File.createTempFile(String,String,File). The file names have the prefix jai-FCSS- and the suffix .tmp. While this is not really a bug as it is the behavior specified by java.io.File.deleteOnExit(), users may encounter this situation and prefer to implement some means of automatically deleting these files should they become troublesome.

    Java 2D Bugs Affecting Java Advanced Imaging API

    These are known Java 2D bugs which may cause problems using JAI or be manifested via JAI.

    • isCompatibleSampleModel() method in ComponentColorModel and PackedColorModel classes in java.awt.image: neither method verifies that the number of SampleModel bands matches the number of ColorModel components and the ComponentColorModel does not verify that SampleModel.getSampleSize(b) is at least ColorModel.getComponentSize(b) for all bands b.

    Additional Problems/Limitations of Note

    These are items which are not bugs per se. Some of this information is duplicated from the README page.

    Codecs

    • TIFF Codec

      Java Advanced Imaging 1.1 TIFF codec supports a large portion of the TIFF specification including baseline TIFF and several extensions. The implementation does however have the following limitations:

      • TIFF decoder cannot read images stored in Planar format (PlanarConfiguration tag has value 2).

      • Bilevel-specific compressed formats may not be written. This includes CCITT Huffman (G3-1D), CCITT T.4 (G3-2D), and CCITT T.6 (G4).

      • The TIFF encoder does not support LZW compression for the usual reason.

    • BMP Codec

      • Only the default RGB color space is supported.

      • Alpha channels are not supported.

      • The BMP encoder supports only version 3, i.e., does not support versions 2 or 4. This is despite the fact that the desired version number may be set via BMPEncodeParam.setVersion() and that BMPEncodeParam defines the constants VERSION_2 and VERSION_4.

      • The BMP encoder does not support compression.

    Applets

    • Solaris

      Automatic installation does not work with Java Plug-In versions prior to 1.3.1, including the 1.3.0_02 version, but has been verified to work with a pre-release version of the 1.3.1 plug-in.