/** * Reduces the color model to {@linkplain IndexColorModel index color model} with {@linkplain * Transparency#OPAQUE opaque} or {@linkplain Transparency#BITMASK bitmask} transparency. If the * current {@linkplain #image} already uses a suitable color model, then this method do nothing. * * @return this {@link ImageWorker}. * @see #isIndexed * @see #isTranslucent * @see #forceIndexColorModel * @see #forceIndexColorModelForGIF */ public final ImageWorker forceBitmaskIndexColorModel() { forceBitmaskIndexColorModel(getTransparentPixel(), true); return this; }
/** * Adds transparency to a preexisting image whose color model is {@linkplain IndexColorModel * index color model}. For all pixels with the value {@code false} in the specified transparency * mask, the corresponding pixel in the {@linkplain #image} is set to the transparent pixel * value. All other pixels are left unchanged. * * @param alphaChannel The mask to apply as a {@linkplain #binarize() binarized} image. * @param errorDiffusion Tells if I should use {@link ErrorDiffusionDescriptor} or {@link * OrderedDitherDescriptor} JAi operations. * @return this {@link ImageWorker}. * @see #isTranslucent * @see #forceBitmaskIndexColorModel */ public ImageWorker addTransparencyToIndexColorModel( final RenderedImage alphaChannel, final boolean errorDiffusion) { addTransparencyToIndexColorModel(alphaChannel, true, getTransparentPixel(), errorDiffusion); return this; }
/** * Reduces the color model to {@linkplain IndexColorModel index color model} * with {@linkplain Transparency#OPAQUE opaque} or * {@linkplain Transparency#BITMASK bitmask} transparency. If the current * {@linkplain #image} already uses a suitable color model, then this method * do nothing. * * @return this {@link ImageWorker}. * * @see #isIndexed * @see #isTranslucent * @see #forceIndexColorModel * @see #forceIndexColorModelForGIF */ public final ImageWorker forceBitmaskIndexColorModel() { forceBitmaskIndexColorModel(getTransparentPixel(), true); return this; }
/** * Reduces the color model to {@linkplain IndexColorModel index color model} * with {@linkplain Transparency#OPAQUE opaque} or * {@linkplain Transparency#BITMASK bitmask} transparency. If the current * {@linkplain #image} already uses a suitable color model, then this method * do nothing. * * @return this {@link ImageWorker}. * * @see #isIndexed * @see #isTranslucent * @see #forceIndexColorModel * @see #forceIndexColorModelForGIF */ public final ImageWorker forceBitmaskIndexColorModel() { forceBitmaskIndexColorModel(getTransparentPixel(), true); return this; }
/** * Adds transparency to a preexisting image whose color model is * {@linkplain IndexColorModel index color model}. For all pixels with the * value {@code false} in the specified transparency mask, the corresponding * pixel in the {@linkplain #image} is set to the transparent pixel value. * All other pixels are left unchanged. * * @param alphaChannel * The mask to apply as a {@linkplain #binarize() binarized} image. * @param errorDiffusion * Tells if I should use {@link ErrorDiffusionDescriptor} or * {@link OrderedDitherDescriptor} JAi operations. * @return this {@link ImageWorker}. * * @see #isTranslucent * @see #forceBitmaskIndexColorModel */ public ImageWorker addTransparencyToIndexColorModel(final RenderedImage alphaChannel, final boolean errorDiffusion) { addTransparencyToIndexColorModel(alphaChannel, true, getTransparentPixel(), errorDiffusion); return this; }
/** * Adds transparency to a preexisting image whose color model is * {@linkplain IndexColorModel index color model}. For all pixels with the * value {@code false} in the specified transparency mask, the corresponding * pixel in the {@linkplain #image} is set to the transparent pixel value. * All other pixels are left unchanged. * * @param alphaChannel * The mask to apply as a {@linkplain #binarize() binarized} image. * @param errorDiffusion * Tells if I should use {@link ErrorDiffusionDescriptor} or * {@link OrderedDitherDescriptor} JAi operations. * @return this {@link ImageWorker}. * * @see #isTranslucent * @see #forceBitmaskIndexColorModel */ public ImageWorker addTransparencyToIndexColorModel(final RenderedImage alphaChannel, final boolean errorDiffusion) { addTransparencyToIndexColorModel(alphaChannel, true, getTransparentPixel(), errorDiffusion); return this; }