/** * Creates a compatible {@code Raster} to dither into. * Only {@code IndexColorModel} allowed. * * @param pSrc * * @return a {@code WritableRaster} */ public final WritableRaster createCompatibleDestRaster(Raster pSrc) { return createCompatibleDestRaster(pSrc, getICM(pSrc)); }
pDest = createCompatibleDestRaster(pSource, pColorModel);
/** * Creates a compatible {@code Raster} to dither into. * Only {@code IndexColorModel} allowed. * * @param pSrc * * @return a {@code WritableRaster} */ public final WritableRaster createCompatibleDestRaster(Raster pSrc) { return createCompatibleDestRaster(pSrc, getICM(pSrc)); }
public final WritableRaster createCompatibleDestRaster(Raster pSrc, IndexColorModel pIndexColorModel) { /* return new BufferedImage(pSrc.getWidth(), pSrc.getHeight(), BufferedImage.TYPE_BYTE_INDEXED, pIndexColorModel).getRaster(); */ return pIndexColorModel.createCompatibleWritableRaster(pSrc.getWidth(), pSrc.getHeight()); }
pDest = createCompatibleDestRaster(pSource, pColorModel);
pDest = createCompatibleDestRaster(pSource, pColorModel);