Package sun.awt.color

Examples of sun.awt.color.ICC_Transform


   
        if (srgb2this == null) {
            ICC_Transform[] transformList = new ICC_Transform [2];
            ICC_ColorSpace srgbCS =
                (ICC_ColorSpace) ColorSpace.getInstance (CS_sRGB);
            transformList[0] = new ICC_Transform (
                srgbCS.getProfile(), ICC_Transform.Any, ICC_Transform.In);
            transformList[1] = new ICC_Transform (
                thisProfile, ICC_Transform.Any, ICC_Transform.Out);
            srgb2this = new ICC_Transform (transformList);
            if (needScaleInit) {
                setComponentScaling();
            }
        }
View Full Code Here


        if (this2xyz == null) {
            ICC_Transform[] transformList = new ICC_Transform [2];
            ICC_ColorSpace xyzCS =
                (ICC_ColorSpace) ColorSpace.getInstance (CS_CIEXYZ);
            try {
                transformList[0] = new ICC_Transform (thisProfile,
                    ICC_Profile.icRelativeColorimetric, ICC_Transform.In);
            } catch (CMMException e) {
                transformList[0] = new ICC_Transform (thisProfile,
                    ICC_Transform.Any, ICC_Transform.In);
            }
            transformList[1] = new ICC_Transform (xyzCS.getProfile(),
                ICC_Transform.Any, ICC_Transform.Out);
            this2xyz = new ICC_Transform (transformList);
            if (needScaleInit) {
                setComponentScaling();
            }
        }
View Full Code Here

   
        if (xyz2this == null) {
            ICC_Transform[] transformList = new ICC_Transform [2];
            ICC_ColorSpace xyzCS =
                (ICC_ColorSpace) ColorSpace.getInstance (CS_CIEXYZ);
            transformList[0] = new ICC_Transform (xyzCS.getProfile(),
                ICC_Transform.Any, ICC_Transform.In);
            try {
                transformList[1] = new ICC_Transform (thisProfile,
                    ICC_Profile.icRelativeColorimetric, ICC_Transform.Out);
            } catch (CMMException e) {
                transformList[1] = new ICC_Transform (thisProfile,
                    ICC_Transform.Any, ICC_Transform.Out);
            }
            xyz2this = new ICC_Transform (transformList);
            if (needScaleInit) {
                setComponentScaling();
            }
        }
View Full Code Here

            g8Tos8LUT[i] = (byte) i;
        }
        ICC_Transform[] transformList = new ICC_Transform[2];
        ICC_ColorSpace srgbCS =
            (ICC_ColorSpace) ColorSpace.getInstance(ColorSpace.CS_sRGB);
        transformList[0] = new ICC_Transform (
            grayCS.getProfile(), ICC_Transform.Any, ICC_Transform.In);
        transformList[1] = new ICC_Transform (
            srgbCS.getProfile(), ICC_Transform.Any, ICC_Transform.Out);
        ICC_Transform t = new ICC_Transform(transformList);
        byte[] tmp = t.colorConvert(g8Tos8LUT, null);
        for (int i = 0, j= 2; i <= 255; i++, j += 3) {
            // All three components of tmp should be equal, since
            // the input color space to colorConvert is a gray scale
            // space.  However, there are slight anomalies in the results.
            // Copy tmp starting at index 2, since colorConvert seems
View Full Code Here

            tmp[i] = (short) i;
        }
        ICC_Transform[] transformList = new ICC_Transform[2];
        ICC_ColorSpace lgCS =
            (ICC_ColorSpace) ColorSpace.getInstance(ColorSpace.CS_GRAY);
        transformList[0] = new ICC_Transform (
            lgCS.getProfile(), ICC_Transform.Any, ICC_Transform.In);
        transformList[1] = new ICC_Transform (
            grayCS.getProfile(), ICC_Transform.Any, ICC_Transform.Out);
        ICC_Transform t = new ICC_Transform(transformList);
        tmp = t.colorConvert(tmp, null);
        byte[] lg16Toog8LUT = new byte[65536];
        for (int i = 0; i <= 65535; i++) {
            // scale unsigned short (0 - 65535) to unsigned byte (0 - 255)
            lg16Toog8LUT[i] =
                (byte) (((float) (tmp[i] & 0xffff)) * (1.0f /257.0f) + 0.5f);
View Full Code Here

            tmp[i] = (short) i;
        }
        ICC_Transform[] transformList = new ICC_Transform[2];
        ICC_ColorSpace srgbCS =
            (ICC_ColorSpace) ColorSpace.getInstance(ColorSpace.CS_sRGB);
        transformList[0] = new ICC_Transform (
            grayCS.getProfile(), ICC_Transform.Any, ICC_Transform.In);
        transformList[1] = new ICC_Transform (
            srgbCS.getProfile(), ICC_Transform.Any, ICC_Transform.Out);
        ICC_Transform t = new ICC_Transform(transformList);
        tmp = t.colorConvert(tmp, null);
        byte[] g16Tos8LUT = new byte[65536];
        for (int i = 0, j= 2; i <= 65535; i++, j += 3) {
            // All three components of tmp should be equal, since
            // the input color space to colorConvert is a gray scale
            // space.  However, there are slight anomalies in the results.
View Full Code Here

            tmp[i] = (short) i;
        }
        ICC_Transform[] transformList = new ICC_Transform[2];
        ICC_ColorSpace lgCS =
            (ICC_ColorSpace) ColorSpace.getInstance(ColorSpace.CS_GRAY);
        transformList[0] = new ICC_Transform (
            lgCS.getProfile(), ICC_Transform.Any, ICC_Transform.In);
        transformList[1] = new ICC_Transform (
            grayCS.getProfile(), ICC_Transform.Any, ICC_Transform.Out);
        ICC_Transform t = new ICC_Transform(transformList);
        short[] lg16Toog16LUT = t.colorConvert(tmp, null);
        if (lg16Toog16Map == null) {
            lg16Toog16Map = Collections.synchronizedMap(new WeakHashMap(2));
        }
        lg16Toog16Map.put(grayCS, lg16Toog16LUT);
        return lg16Toog16LUT;
View Full Code Here

              renderState = ICC_Profile.icPerceptual;
                    whichTrans = ICC_Transform.In;
                }
            }

            theTransforms[i1] = new ICC_Transform (theProfiles[i1],
                                                   renderState, whichTrans);

            /* get this profile's rendering intent to select transform
               from next profile */
            renderState = getRenderingIntent(theProfiles[i1]);

            /* "middle" profiles use simulation transform */
            whichTrans = ICC_Transform.Simulation;
        }

        /* make the net transform */
        thisTransform = new ICC_Transform (theTransforms);

        /* update corresponding source and dest profiles */
        thisSrcProfile = srcProfile;
        thisDestProfile = destProfile;
    }
View Full Code Here

                  renderState = ICC_Profile.icPerceptual;
                        whichTrans = ICC_Transform.In;
                    }
                }

                theTransforms[i1] = new ICC_Transform (profileList[i1],
                                                       renderState, whichTrans);

                /* get this profile's rendering intent to select transform
                   from next profile */
                renderState = getRenderingIntent(profileList[i1]);

                /* "middle" profiles use simulation transform */
                whichTrans = ICC_Transform.Simulation;
            }

            /* make the net transform */
            thisRasterTransform = new ICC_Transform (theTransforms);
        }

        int srcTransferType = src.getTransferType();
        int dstTransferType = dest.getTransferType();
        if ((srcTransferType == DataBuffer.TYPE_FLOAT) ||
View Full Code Here

                  renderState = renderingIntent >= 0 ? renderingIntent : ICC_Profile.icPerceptual;
                    whichTrans = ICC_Transform.In;
                }
            }

            theTransforms[i1] = new ICC_Transform (theProfiles[i1],
                                                   renderState, whichTrans);

            /* get this profile's rendering intent to select transform
               from next profile */
            renderState = renderingIntent >= 0 ? renderingIntent : getRenderingIntent(theProfiles[i1]);

            /* "middle" profiles use simulation transform */
            whichTrans = ICC_Transform.Simulation;
        }

        /* make the net transform */
        thisTransform = new ICC_Transform (theTransforms);

        /* update corresponding source and dest profiles */
        thisSrcProfile = srcProfile;
        thisDestProfile = destProfile;
    }
View Full Code Here

TOP

Related Classes of sun.awt.color.ICC_Transform

Copyright © 2018 www.massapicom. 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.