@Override public ColorModel createColorModel( SampleModel sampleModel, List sources, Map configuration) { final int dataType = sampleModel.getDataType(); final int numBands = sampleModel.getNumBands(); ColorSpace cs; switch (numBands) { case 1: case 2: cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); break; case 3: cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); break; default: cs = new BogusColorSpace(numBands); } return RasterFactory.createComponentColorModel( dataType, cs, false, false, Transparency.OPAQUE); } });
/** * Tells me whether or not the native libraries for JAI/ImageIO are active or not. * * @return <code>false</code> in case the JAI/ImageIO native libs are not in the path, <code> * true</code> otherwise. */ public static boolean isCLibAvailable() { return PackageUtil.isCodecLibAvailable(); }
/** * Converts a pixel's Y coordinate into a vertical tile index. * This is a convenience method. No attempt is made to detect * out-of-range coordinates. * * @param y the Y coordinate of a pixel. * @return the Y index of the tile containing the pixel. */ public int YToTileY(int y) { return YToTileY(y, getTileGridYOffset(), getTileHeight()); }
public String getDescription(Locale locale) { String desc = PackageUtil.getSpecificationTitle() + " GIF Image Writer"; return desc; }
com.sun.media.imageioimpl.common.ImageUtil.getJDKImageReaderWriterSPI( IIORegistry.getDefaultInstance(), "PNG", false); if (providers == null || providers.isEmpty()) {
public static final synchronized ColorSpace getInstance() { if(theInstance == null) { theInstance = new SimpleCMYKColorSpace(); } return theInstance; }
public void onRegistration(ServiceRegistry registry, Class category) { if (registered) { return; } registered = true; // By JDK 1.7, the BMPImageWriter will have been in JDK core for // atleast two FCS releases, so we can set JIIO's to lower priority // With JDK 1.8, we can entirely de-register the JIIO one ImageUtil.processOnRegistration(registry, category, "BMP", this, 8, 7); // JDK version 1.8, 1.7 }
final ColorModel newCm = new ComponentColorModel( new BogusColorSpace(numBands), false, // If true, supports transparency. false, // If true, alpha is premultiplied.
if (PackageUtil.isCodecLibAvailable()) { boolean succeeded = ImageIOUtilities.replaceProvider(
public String getDescription(Locale locale) { String desc = PackageUtil.getSpecificationTitle() + " Raw Image Writer"; return desc; }
public static final synchronized ColorSpace getInstance() { if(theInstance == null) { theInstance = new SimpleCMYKColorSpace(); } return theInstance; }
colorSpace = new BogusColorSpace(numberOfBands); int[] numBits = new int[numberOfBands]; for (int i = 0; i < numberOfBands; i++) {
if (PackageUtil.isCodecLibAvailable()) { boolean succeeded = ImageIOUtilities.replaceProvider(
public String getDescription(Locale locale) { String desc = PackageUtil.getSpecificationTitle() + " TIFF Image Writer"; return desc; }
if (PackageUtil.isCodecLibAvailable()) { boolean succeeded = ImageIOUtilities.replaceProvider(
if (PackageUtil.isCodecLibAvailable()) { boolean succeeded = ImageIOUtilities.replaceProvider(
/** * Tells me whether or not the native libraries for JAI/ImageIO are active or not. * * @return <code>false</code> in case the JAI/ImageIO native libs are not in the path, <code>true</code> otherwise. * @deprecated Use {@link ImageIOExt#isCLibAvailable()} instead */ public static boolean isCLibAvailable() { return PackageUtil.isCodecLibAvailable(); }
/** * Tells me whether or not the native libraries for JAI/ImageIO are active or not. * * @return <code>false</code> in case the JAI/ImageIO native libs are not in the path, <code>true</code> otherwise. */ public static boolean isCLibAvailable() { return PackageUtil.isCodecLibAvailable(); }