Examples of fromRGB()


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

/*     */   private WritableRaster computeRectColorSpaceJAIFromRGB(Raster src, ImageParameters srcParam, WritableRaster dest, ImageParameters dstParam)
/*     */   {
/* 325 */     src = convertRasterToUnsigned(src);
/* 326 */     ColorSpaceJAI colorSpaceJAI = (ColorSpaceJAI)dstParam.getColorModel().getColorSpace();
/*     */
/* 328 */     dest = colorSpaceJAI.fromRGB(src, srcParam.getComponentSize(), dest, dstParam.getComponentSize());
/*     */
/* 331 */     dest = convertRasterToSigned(dest);
/* 332 */     return dest;
/*     */   }
/*     */
View Full Code Here

Examples of org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace.fromRGB()

            g2d.fillRect(10, 30, 40, 40);

            //Just convert RGB to CMYK and use that
            float[] compsRGB = colRGB.getColorComponents(null);
            DeviceCMYKColorSpace cmykCS = ColorSpaces.getDeviceCMYKColorSpace();
            float[] compsCMYK = cmykCS.fromRGB(compsRGB);
            Color colCMYK = DeviceCMYKColorSpace.createCMYKColor(compsCMYK);
            g2d.setColor(colCMYK);
            g2d.fillRect(60, 30, 40, 40);

            //Try CIELab (not implemented, yet)
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.