private InverseColorMapIndexColorModel(IndexColorModel pColorModel, int[] pRGBs) { super(pColorModel.getComponentSize()[0], pColorModel.getMapSize(), pRGBs, 0, pColorModel.getTransferType(), pColorModel.getValidPixels()); rgbs = pRGBs; mapSize = rgbs.length; inverseMap = new InverseColorMap(rgbs); whiteIndex = getWhiteIndex(); }
public MutableIndexColorModel(final IndexColorModel base) { super(base.getPixelSize(), base.getComponentSize(), base.getColorSpace(), base.hasAlpha(), base.isAlphaPremultiplied(), base.getTransparency(), base.getTransferType()); this.rgbs = getRGBs(base); }
/** Gets the size of the components or the bit depth for all the color * coomponents. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte)(comp[i] - 1); return buf; }
/** Gets the size of the components or the bit depth for all the color * coomponents. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte)(comp[i] - 1); return buf; }
/** * Gets the size of the components or the bit depth for all the color * components. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte) (comp[i] - 1); return buf; }
/** Gets the size of the components or the bit depth for all the color * coomponents. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte)(comp[i] - 1); return buf; }
/** Gets the size of the components or the bit depth for all the color * coomponents. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte)(comp[i] - 1); return buf; }
/** Gets the size of the components or the bit depth for all the color * coomponents. */ private static byte[] getCompSize(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = comp.length; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte)(comp[i] - 1); return buf; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** Compute the length of this box. */ private static int computeLength(IndexColorModel icm) { int size = icm.getMapSize(); int[] comp = icm.getComponentSize(); return 11 + comp.length + size * comp.length; }
/** {@inheritDoc} */ public int getBitsPerComponent() { ColorModel cm = getEffectiveColorModel(); if (cm instanceof IndexColorModel) { IndexColorModel icm = (IndexColorModel)cm; return icm.getComponentSize(0); } else { return cm.getComponentSize(0); } }
private InverseColorMapIndexColorModel(IndexColorModel pColorModel, int[] pRGBs) { super(pColorModel.getComponentSize()[0], pColorModel.getMapSize(), pRGBs, 0, ImageUtil.getTransferType(pColorModel), pColorModel.getValidPixels()); mRGBs = pRGBs; mMapSize = mRGBs.length; mInverseMap = new InverseColorMap(mRGBs); mWhiteIndex = getWhiteIndex(); }
private InverseColorMapIndexColorModel(IndexColorModel pColorModel, int[] pRGBs) { super(pColorModel.getComponentSize()[0], pColorModel.getMapSize(), pRGBs, 0, pColorModel.getTransferType(), pColorModel.getValidPixels()); rgbs = pRGBs; mapSize = rgbs.length; inverseMap = new InverseColorMap(rgbs); whiteIndex = getWhiteIndex(); }
/** Gets the LUT from the <code>IndexColorModel</code> as an two-dimensional * byte array. */ private static byte[][] getLUT(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = icm.getMapSize(); byte[][] lut = new byte[comp.length][size]; icm.getReds(lut[0]); icm.getGreens(lut[1]); icm.getBlues(lut[2]); if (comp.length == 4) icm.getAlphas(lut[3]); return lut; }
/** Gets the LUT from the <code>IndexColorModel</code> as an two-dimensional * byte array. */ private static byte[][] getLUT(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = icm.getMapSize(); byte[][] lut = new byte[comp.length][size]; icm.getReds(lut[0]); icm.getGreens(lut[1]); icm.getBlues(lut[2]); if (comp.length == 4) icm.getAlphas(lut[3]); return lut; }
/** Gets the LUT from the <code>IndexColorModel</code> as an two-dimensional * byte array. */ private static byte[][] getLUT(IndexColorModel icm) { int[] comp = icm.getComponentSize(); int size = icm.getMapSize(); byte[][] lut = new byte[comp.length][size]; icm.getReds(lut[0]); icm.getGreens(lut[1]); icm.getBlues(lut[2]); if (comp.length == 4) icm.getAlphas(lut[3]); return lut; }