@Override public int getRGB(Object inData) { byte[] ba = (byte[]) inData; ColorSpace cs = getColorSpace(); float[] fba = new float[] { (ba[0] & 0xFF) / 255f, (ba[1] & 0xFF) / 255f, (ba[2] & 0xFF) / 255f }; float[] rgb = cs.toRGB(fba); int ret = (((int) (rgb[0] * 255)) << 16) | (((int) (rgb[1] * 255)) << 8) | (((int) (rgb[2] * 255))); return ret; }
@Override public int getRGB(Object inData) { byte[] ba = (byte[]) inData; ColorSpace cs = getColorSpace(); float[] fba = new float[] { (ba[0] & 0xFF) / 255f, (ba[1] & 0xFF) / 255f, (ba[2] & 0xFF) / 255f }; float[] rgb = cs.toRGB(fba); int ret = (((int) (rgb[0] * 255)) << 16) | (((int) (rgb[1] * 255)) << 8) | (((int) (rgb[2] * 255))); return ret; }