Package java.awt.color

Examples of java.awt.color.ICC_ColorSpace


                   (colorSpace.getMinValue(0) == 0.0f) &&
                   (colorSpace.getMaxValue(0) == 1.0f)) {
            // Note that a normalized range of 0.0 - 1.0 for the gray
            // component is required, because usage of these LUTs makes
            // that assumption.
            ICC_ColorSpace ics = (ICC_ColorSpace) colorSpace;
            is_ICCGray_stdScale = true;
            nonStdScale = false;
            fromsRGB8LUT16 = ColorModel.getsRGB8ToLinearRGB16LUT();
            if (ColorModel.isLinearGRAYspace(ics)) {
                is_LinearGray_stdScale = true;
View Full Code Here


        byte[] g8Tos8LUT = new byte[256];
        for (int i = 0; i <= 255; i++) {
            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
View Full Code Here

        short[] tmp = new short[65536];
        for (int i = 0; i <= 65535; i++) {
            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];
View Full Code Here

        short[] tmp = new short[65536];
        for (int i = 0; i <= 65535; i++) {
            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
View Full Code Here

        short[] tmp = new short[65536];
        for (int i = 0; i <= 65535; i++) {
            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) {
View Full Code Here

            throws ImageReadException, IOException {
        ICC_Profile icc = Sanselan.getICCProfile(file);
        if (icc == null)
            return src;

        ICC_ColorSpace cs = new ICC_ColorSpace(icc);

        BufferedImage dst = convertFromColorSpace(src, cs);
        return dst;
    }
View Full Code Here

        return dst;
    }

    public BufferedImage relabelColorSpace(BufferedImage bi, ICC_Profile profile)
            throws ImagingOpException {
        ICC_ColorSpace cs = new ICC_ColorSpace(profile);

        return relabelColorSpace(bi, cs);
    }
View Full Code Here

    }

    public BufferedImage convertBetweenICCProfiles(BufferedImage bi,
            ICC_Profile from, ICC_Profile to) {
        ICC_ColorSpace cs_from = new ICC_ColorSpace(from);
        ICC_ColorSpace cs_to = new ICC_ColorSpace(to);

        return convertBetweenColorSpaces(bi, cs_from, cs_to);
    }
View Full Code Here

        return convertBetweenColorSpaces(bi, cs_from, cs_to);
    }

    public BufferedImage convertToICCProfile(BufferedImage bi, ICC_Profile to) {
        ICC_ColorSpace cs_to = new ICC_ColorSpace(to);

        return convertToColorSpace(bi, cs_to);
    }
View Full Code Here

            System.out.println(prefix + ": " + "Unknown ColorSpace: "
                    + cs.getClass().getName());
            return;
        }

        ICC_ColorSpace fICC_ColorSpace = (ICC_ColorSpace) cs;
        ICC_Profile fICC_Profile = fICC_ColorSpace.getProfile();

        byte bytes[] = fICC_Profile.getData();

        IccProfileParser parser = new IccProfileParser();
View Full Code Here

TOP

Related Classes of java.awt.color.ICC_ColorSpace

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.