/** * Returns the {@code String} representation of the contents of this {@code ColorModel}object. * * @return a {@code String} representing the contents of this {@code ColorModel} object. */ public String toString() { return new String( "ComponentColorModelJAI: #pixelBits = " + pixel_bits + " numComponents = " + super.getNumComponents() + " color space = " + super.getColorSpace() + " transparency = " + super.getTransparency() + " has alpha = " + super.hasAlpha() + " isAlphaPre = " + super.isAlphaPremultiplied()); } }
/** * Returns the {@code String} representation of the contents of * this {@code ColorModel}object. * * @return a {@code String} representing the contents of this * {@code ColorModel} object. */ public String toString() { return new String("ComponentColorModelJAI: #pixelBits = "+pixel_bits + " numComponents = "+ super.getNumComponents() + " color space = "+ super.getColorSpace() + " transparency = "+ super.getTransparency() + " has alpha = "+ super.hasAlpha() + " isAlphaPre = "+ super.isAlphaPremultiplied()); } }
/** * Returns the {@code String} representation of the contents of * this {@code ColorModel}object. * * @return a {@code String} representing the contents of this * {@code ColorModel} object. */ public String toString() { return new String("ComponentColorModelJAI: #pixelBits = "+pixel_bits + " numComponents = "+ super.getNumComponents() + " color space = "+ super.getColorSpace() + " transparency = "+ super.getTransparency() + " has alpha = "+ super.hasAlpha() + " isAlphaPre = "+ super.isAlphaPremultiplied()); } }
PaletteData palette = new PaletteData(0x0000FF, 0x00FF00, 0xFF0000); // BGR ImageData data = new ImageData(image.getWidth(), image.getHeight(), 24, palette); if (cmodel.hasAlpha()) data.alphaData = new byte[image.getWidth() * image.getHeight()]; WritableRaster raster = image.getRaster(); int[] pixelArray = new int[4];
Transparency.OPAQUE, ccm.getTransferType()); return new ComponentColorModel(cs, ccm.hasAlpha(), ccm.isAlphaPremultiplied(), ccm.getTransparency(), ccm.getTransferType());
ComponentColorModel.OPAQUE, ccm.getTransferType()); else return new ComponentColorModel(cs, ccm.hasAlpha(), ccm .isAlphaPremultiplied(), ccm.getTransparency(), ccm .getTransferType());