if (!reference.getColorSpace().equals(reference.getColorSpace())) { return false;
final ColorSpace space = colors.getColorSpace(); final float[] RGB = { color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f
public MutableIndexColorModel(final IndexColorModel base) { super(base.getPixelSize(), base.getComponentSize(), base.getColorSpace(), base.hasAlpha(), base.isAlphaPremultiplied(), base.getTransparency(), base.getTransferType()); this.rgbs = getRGBs(base); }
/** * Creates a {@code DiscreteAlphaIndexColorModel}, delegating color map look-ups * to the given {@code IndexColorModel}. * * @param icm The {@code IndexColorModel} delegate. Color map entries are assumed to be * fully opaque, any transparency or transparent index will be ignored. */ public DiscreteAlphaIndexColorModel(final IndexColorModel icm) { super( notNull(icm, "IndexColorModel").getPixelSize() * 2, new int[] {icm.getPixelSize(), icm.getPixelSize(), icm.getPixelSize(), icm.getPixelSize()}, icm.getColorSpace(), true, false, Transparency.TRANSLUCENT, icm.getTransferType() ); this.icm = icm; }
int alpha = Integer.MAX_VALUE; float delta = Float.POSITIVE_INFINITY; final ColorSpace space = colors.getColorSpace(); final float[] RGB = new float[3]; final float[] BLACK = XYZtoLAB(space.toCIEXYZ(RGB)); // Black in Lab color space.
hints.put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_SPEED); hints.put(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE); op_ = new ColorConvertOp(colorModel_.getColorSpace(), new RenderingHints(hints));
if (!reference.getColorSpace().equals(reference.getColorSpace())) { return false;
final int exclude) final ColorSpace space = colors.getColorSpace(); final float[] RGB = { color.getRed() / 255f,
final int exclude) final ColorSpace space = colors.getColorSpace(); final float[] RGB = { color.getRed() /255f,
final int exclude) final ColorSpace space = colors.getColorSpace(); final float[] RGB = { color.getRed() /255f,
public MutableIndexColorModel(final IndexColorModel base) { super(base.getPixelSize(), base.getComponentSize(), base.getColorSpace(), base.hasAlpha(), base.isAlphaPremultiplied(), base.getTransparency(), base.getTransferType()); this.rgbs = getRGBs(base); }
/** * Creates a {@code DiscreteAlphaIndexColorModel}, delegating color map look-ups * to the given {@code IndexColorModel}. * * @param icm The {@code IndexColorModel} delegate. Color map entries are assumed to be * fully opaque, any transparency or transparent index will be ignored. */ public DiscreteAlphaIndexColorModel(final IndexColorModel icm) { super( notNull(icm, "IndexColorModel").getPixelSize() * 2, new int[] {icm.getPixelSize(), icm.getPixelSize(), icm.getPixelSize(), icm.getPixelSize()}, icm.getColorSpace(), true, false, Transparency.TRANSLUCENT, icm.getTransferType() ); this.icm = icm; }
PDFArray indexed = new PDFArray(dict); indexed.add(new PDFName("Indexed")); if (icm.getColorSpace().getType() != ColorSpace.TYPE_RGB) { log.warn("Indexed color space is not using RGB as base color space." + " The image may not be handled correctly." + " Base color space: " + icm.getColorSpace() + " Image: " + image.getInfo()); indexed.add(new PDFName(toPDFColorSpace(icm.getColorSpace()).getName())); for (int i = 0; i < c; i++) { int entry = palette[i];
int alpha = Integer.MAX_VALUE; float delta = Float.POSITIVE_INFINITY; final ColorSpace space = colors.getColorSpace(); final float[] RGB = new float[3]; final float[] BLACK = XYZtoLAB(space.toCIEXYZ(RGB)); // Black in Lab color space.
int alpha = Integer.MAX_VALUE; float delta = Float.POSITIVE_INFINITY; final ColorSpace space = colors.getColorSpace(); final float[] RGB = new float[3]; final float[] BLACK = XYZtoLAB(space.toCIEXYZ(RGB)); // Black in Lab color space.
int alpha = Integer.MAX_VALUE; float delta = Float.POSITIVE_INFINITY; final ColorSpace space = colors.getColorSpace(); final float[] RGB = new float[3]; final float[] BLACK = XYZtoLAB(space.toCIEXYZ(RGB)); // Black in Lab color space.
case 0: break; cs = icm.getColorSpace();
.getNumColorComponents() || defICM.hasAlpha() != actualICM.hasAlpha() || !defICM.getColorSpace() .equals(actualICM.getColorSpace()) || defICM.getTransferType() != actualICM.getTransferType()) return true;