Examples of toRGB()


Examples of java.awt.color.ColorSpace.toRGB()

                for (int k = 0; k < 4; k++)
                {
                    srcColorValues[k] /= 255f;
                }
                // convert CMYK to RGB
                float[] rgbValues = cs.toRGB(srcColorValues);
                // convert values from 0..1 to 0..255
                for (int k = 0; k < 3; k++)
                {
                    rgb[rgbIndex+k] = (byte)(rgbValues[k] * 255);
                }
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

            if(lastC==C && lastM==M && lastY==Y && lastK==K){
                //use existing values if not changed
            }else{//work out new
               
              rgb=CMYK.toRGB(new float[]{C,M,Y,K});

                lastC=C;
                lastM=M;
                lastY=Y;
                lastK=K;
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

        float[] color = new float[3];
        color[0] = rand.nextFloat();
        color[1] = rand.nextFloat();
        color[2] = rand.nextFloat();

        float[] res = cs.toRGB(color);
        System.out.println(res[0] + ", " + res[1] + ", " + res[2]);
    }

    public void testNull() {
       
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

     @return Returns converted colorvalues.
     */
    private float[] fromCIEXYZtoRGB(float[] xyzvalue)
    {
        ColorSpace colorspaceXYZ = ColorSpace.getInstance(CS_CIEXYZ);
        return colorspaceXYZ.toRGB(xyzvalue);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

     @return Returns converted colorvalues.
     */
    private float[] fromCIEXYZtoRGB(float[] xyzvalue)
    {
        ColorSpace colorspaceXYZ = ColorSpace.getInstance(CS_CIEXYZ);
        return colorspaceXYZ.toRGB(xyzvalue);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

     @return Returns converted colorvalues.
     */
    private float[] fromCIEXYZtoRGB(float[] xyzvalue)
    {
        ColorSpace colorspaceXYZ = ColorSpace.getInstance(CS_CIEXYZ);
        return colorspaceXYZ.toRGB(xyzvalue);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of java.awt.color.ColorSpace.toRGB()

    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;
    }

View Full Code Here

Examples of java.awt.color.ICC_ColorSpace.toRGB()

        float[] color = new float[3];
        color[0] = rand.nextFloat();
        color[1] = rand.nextFloat();
        color[2] = rand.nextFloat();

        float[] res = cs.toRGB(color);
        System.out.println(res[0] + ", " + res[1] + ", " + res[2]);
    }

    public void testNull() {
       
View Full Code Here

Examples of javax.media.jai.ColorSpaceJAI.toRGB()

               ImageParameters dstParam) {
  src = convertRasterToUnsigned(src);

  ColorSpaceJAI colorSpaceJAI
      = (ColorSpaceJAI) srcParam.getColorModel().getColorSpace();
  dest = colorSpaceJAI.toRGB(src, srcParam.getComponentSize(), dest,
                 dstParam.getComponentSize());

        dest = convertRasterToSigned(dest);
  return dest;
    }
View Full Code Here

Examples of javax.media.jai.ColorSpaceJAI.toRGB()

/*     */   {
/* 305 */     src = convertRasterToUnsigned(src);
/*     */
/* 307 */     ColorSpaceJAI colorSpaceJAI = (ColorSpaceJAI)srcParam.getColorModel().getColorSpace();
/*     */
/* 309 */     dest = colorSpaceJAI.toRGB(src, srcParam.getComponentSize(), dest, dstParam.getComponentSize());
/*     */
/* 312 */     dest = convertRasterToSigned(dest);
/* 313 */     return dest;
/*     */   }
/*     */
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.