colorModel = ImageUtil.createColorModel(sampleModel); if (colorModel == null) { LOGGER.severe("No ColorModels found");
@Override public String getNodeValue() { return ImageUtil.convertObjectToString(getContent()); }
boolean allBinary = ImageUtil.isBinary(dstSM);
ImageUtil.canEncodeImage(this, this.imageType); this.isBilevel = ImageUtil.isBinary(this.image.getSampleModel()); (!isInverted && ImageUtil.imageIsContiguous(this.image))) &&
ImageUtil.isBinary(this.image.getRaster().getSampleModel()); this.isContiguous = this.isBilevel ? true : ImageUtil.imageIsContiguous(this.image);
int max = maxValues[i]; if (ImageUtil.isBinary(sampleModel)) { ImageUtil.setUnpackedBinaryData(bytebuf, raster, new Rectangle(tOffx,
sampleModel = originalSampleModel.createSubsetSampleModel(sourceBands); colorModel = ImageUtil.createColorModel(null, sampleModel); noTransform = false; this.tileDataSize = ImageUtil.getTileSize(originalSampleModel);
if (ImageUtil.isIndicesForGrayscale(r, g, b)) colorModel = ImageUtil.createColorModel(null, sampleModel); else colorModel = new IndexColorModel(bitsPerPixel, (int)size, r, g, b); ImageUtil.createColorModel(colorSpace, sampleModel);
new Rectangle(dstMinX, dstMinY, dstWidth, dstHeight) : ras.getBounds(); byteData = ImageUtil.getPackedBinaryData(ras, rect); dstOffset = 0; pixelBitStride = 1; new Rectangle(dstMinX, dstMinY, dstWidth, dstHeight) : ras.getBounds(); ImageUtil.setPackedBinaryData(byteData, ras, rect);
com.sun.media.imageioimpl.common.ImageUtil.getJDKImageReaderWriterSPI( IIORegistry.getDefaultInstance(), "PNG", false); if (providers == null || providers.isEmpty()) {
/** Checks that the provided <code>ImageWriter</code> can encode * the provided <code>ColorModel</code> and <code>SampleModel</code>. * If not, an <code>IIOException</code> will be thrown. * @param writer The provided <code>ImageWriter</code>. * @param colorModel The provided <code>ColorModel</code>. * @param sampleModel The provided <code>SampleModel</code>. * @throws IIOException If the writer cannot encoded the provided image. */ public static final void canEncodeImage(ImageWriter writer, ColorModel colorModel, SampleModel sampleModel) throws IIOException { ImageTypeSpecifier type = null; if (colorModel != null && sampleModel != null) type = new ImageTypeSpecifier(colorModel, sampleModel); canEncodeImage(writer, type); }
public static long getBandSize(SampleModel sm) { int elementSize = DataBuffer.getDataTypeSize(sm.getDataType()); if (sm instanceof ComponentSampleModel) { ComponentSampleModel csm = (ComponentSampleModel)sm; int pixelStride = csm.getPixelStride(); int scanlineStride = csm.getScanlineStride(); long size = Math.min(pixelStride, scanlineStride); if (pixelStride > 0) size += pixelStride * (sm.getWidth() - 1); if (scanlineStride > 0) size += scanlineStride * (sm.getHeight() - 1); return size * ((elementSize + 7) / 8); } else return getTileSize(sm); }
ImageUtil.getDestinationType(param, imageTypes);
byte[] buf = ImageUtil.getPackedBinaryData(raster, tileRect);
ImageUtil.isNonStandardICCColorSpace(cm.getColorSpace())) { ICC_ColorSpace iccColorSpace = (ICC_ColorSpace)cm.getColorSpace(); byte[] iccProfileData = iccColorSpace.getProfile().getData();
ImageUtil.canEncodeImage(this, this.imageType); this.isBilevel = ImageUtil.isBinary(this.image.getSampleModel()); (!isInverted && ImageUtil.imageIsContiguous(this.image))) &&
ImageUtil.isBinary(this.image.getRaster().getSampleModel()); this.isContiguous = this.isBilevel ? true : ImageUtil.imageIsContiguous(this.image);
int max = maxValues[i]; if (ImageUtil.isBinary(sampleModel)) { ImageUtil.setUnpackedBinaryData(bytebuf, raster, new Rectangle(tOffx,
sampleModel = originalSampleModel.createSubsetSampleModel(sourceBands); colorModel = ImageUtil.createColorModel(null, sampleModel); noTransform = false; this.tileDataSize = ImageUtil.getTileSize(originalSampleModel);
if (ImageUtil.isIndicesForGrayscale(r, g, b)) colorModel = ImageUtil.createColorModel(null, sampleModel); else colorModel = new IndexColorModel(bitsPerPixel, (int)size, r, g, b); ImageUtil.createColorModel(colorSpace, sampleModel);