Package java.awt.color

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


     *
     */
    public float[] fromRGB(float[] rgbvalue)
    {
        ColorSpace colorspaceXYZ = ColorSpace.getInstance(CS_CIEXYZ);
        return fromCIEXYZ(colorspaceXYZ.fromRGB(rgbvalue));
    }

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


    for (int i = 0; i < rgb.length; i++) {
      // get the RGB values
      rgbValue[0] = (rgb[i] >> 16) & 0xFF; // RED
      rgbValue[1] = (rgb[i] >> 8) & 0xFF; // GREEN
      rgbValue[2] = (rgb[i] >> 0) & 0xFF; // BLUE
      float[] luv = space.fromRGB(rgbValue);
      double[] arr = new double[luv.length];
      for (int x = 0; x < luv.length; x++) {
        arr[x] = luv[x];
      }
      vectors[currentIndex++] = new DenseDoubleVector(arr);
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.