Code example for ImageTypeSpecifier

0
 
        Raster readRaster = readRaster(imageIndex, param);
 
        csm = rasterHandler.getSampleModel();
        ccmdl = PlanarImage.createColorModel(csm);
        imageType = new ImageTypeSpecifier(ccmdl, csm);
 
        final BufferedImage bi = new BufferedImage(ccmdl, (WritableRaster) readRaster, false, null);
 
        if (hasListeners) {
            if (rasterHandler.isAborting())
                processReadAborted(); 
            else 
                processImageComplete(); 
        } 
        return bi;
    } 
 
    public BufferedImage read( final int imageIndex ) throws IOException {
        ensureOpen();