Package com.google.code.appengine.awt.color

Examples of com.google.code.appengine.awt.color.ICC_ColorSpace


            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

            if (icc_profile != null)
            {
                Boolean is_srgb = new IccProfileParser().issRGB(icc_profile);
                if (is_srgb == null || !is_srgb.booleanValue())
                {
                    ICC_ColorSpace cs = new ICC_ColorSpace(icc_profile);

                    ColorModel srgbCM = ColorModel.getRGBdefault();
                    ColorSpace cs_sRGB = srgbCM.getColorSpace();

                    result = new ColorTools().convertBetweenColorSpaces(result,
View Full Code Here

            float tmpData[][] = scaler.scaleNormalize(src);
           
            // Get source and destination color spaces
            ColorSpace srcCS = (srcPf == null) ?
                    (ColorSpace) first:
                    new ICC_ColorSpace(srcPf);
            ColorSpace dstCS = (dstPf == null) ?
                    (ColorSpace) last:
                    new ICC_ColorSpace(dstPf);
                   
            applySequence(sequence, tmpData, srcCS, dstCS);
           
            scaler.loadScalingData(dst, null);
            scaler.unscaleNormalized(dst, tmpData);
View Full Code Here

        // Get destination color space
        Object destination = conversionSequence[nSpaces-1];
        ColorSpace dstCS =
            (destination instanceof ColorSpace) ?
                    (ColorSpace) destination :
                    new ICC_ColorSpace((ICC_Profile) destination);
       
        ColorModel srcCM = src.getColorModel();    
        ColorModel dstCM = new ComponentColorModel(dstCS,
                srcCM.hasAlpha(),
                srcCM.isAlphaPremultiplied(),
View Full Code Here

    public static ColorSpace getInstance(int colorspace) {
        switch (colorspace) {
            case CS_sRGB:
                if (cs_sRGB == null) {
                    cs_sRGB = new ICC_ColorSpace(
                            new ICC_ProfileStub(CS_sRGB));
                    LUTColorConverter.sRGB_CS = cs_sRGB;
                            //ICC_Profile.getInstance (CS_sRGB));
                }
                return cs_sRGB;
            case CS_CIEXYZ:
                if (cs_CIEXYZ == null) {
                    cs_CIEXYZ = new ICC_ColorSpace(
                            new ICC_ProfileStub(CS_CIEXYZ));
                            //ICC_Profile.getInstance (CS_CIEXYZ));
                }
                return cs_CIEXYZ;
            case CS_GRAY:
                if (cs_Gray == null) {
                    cs_Gray = new ICC_ColorSpace(
                            new ICC_ProfileStub(CS_GRAY));
                    LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
                            //ICC_Profile.getInstance (CS_GRAY));
                }
                return cs_Gray;
            case CS_PYCC:
                if (cs_PYCC == null) {
                    cs_PYCC = new ICC_ColorSpace(
                            new ICC_ProfileStub(CS_PYCC));
                            //ICC_Profile.getInstance (CS_PYCC));
                }
                return cs_PYCC;
            case CS_LINEAR_RGB:
                if (cs_LRGB == null) {
                    cs_LRGB = new ICC_ColorSpace(
                            new ICC_ProfileStub(CS_LINEAR_RGB));
                    LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
                            //ICC_Profile.getInstance (CS_LINEAR_RGB));
                }
                return cs_LRGB;
View Full Code Here

    }

    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        ObjectInputStream.GetField fields = in.readFields();
        resolvedDeserializedInst =
                new ICC_ColorSpace((ICC_Profile) fields.get("thisProfile", null)); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of com.google.code.appengine.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.