Examples of ICC_Profile


Examples of ae.java.awt.color.ICC_Profile

        if (iccData == null) {
            iccCS = null;
            return;
        }

        ICC_Profile newProfile = null;
        try {
            newProfile = ICC_Profile.getInstance(iccData);
        } catch (IllegalArgumentException e) {
            /*
             * Color profile data seems to be invalid.
             * Ignore this profile.
             */
            iccCS = null;
            warningOccurred(WARNING_IGNORE_INVALID_ICC);

            return;
        }
        byte[] newData = newProfile.getData();

        ICC_Profile oldProfile = null;
        if (iccCS instanceof ICC_ColorSpace) {
            oldProfile = ((ICC_ColorSpace)iccCS).getProfile();
        }
        byte[] oldData = null;
        if (oldProfile != null) {
            oldData = oldProfile.getData();
        }

        /*
         * At the moment we can't rely on the ColorSpace.equals()
         * and ICC_Profile.equals() because they do not detect
View Full Code Here

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

            img.setDpi(dpiX, dpiY);
            img.setXYRatio(XYRatio);
            if (dir.isTagPresent(TIFFConstants.TIFFTAG_ICCPROFILE)) {
                try {
                    TIFFField fd = dir.getField(TIFFConstants.TIFFTAG_ICCPROFILE);
                    ICC_Profile icc_prof = ICC_Profile.getInstance(fd.getAsBytes());
                    if (icc_prof.getNumComponents() == 1)
                        img.tagICC(icc_prof);
                }
                catch (RuntimeException e) {
                    //empty
                }
View Full Code Here

Examples of com.itextpdf.text.pdf.ICC_Profile

            for (int k = 0; k < icc.length; ++k) {
                System.arraycopy(icc[k], 14, ficc, total, icc[k].length - 14);
                total += icc[k].length - 14;
            }
            try {
              ICC_Profile icc_prof = ICC_Profile.getInstance(ficc, colorspace);
              tagICC(icc_prof);
            }
            catch(IllegalArgumentException e) {
              // ignore ICC profile if it's invalid.
            }
View Full Code Here

Examples of com.itextpdf.text.pdf.ICC_Profile

            img.setDpi(dpiX, dpiY);
            img.setXYRatio(XYRatio);
            if (dir.isTagPresent(TIFFConstants.TIFFTAG_ICCPROFILE)) {
                try {
                    TIFFField fd = dir.getField(TIFFConstants.TIFFTAG_ICCPROFILE);
                    ICC_Profile icc_prof = ICC_Profile.getInstance(fd.getAsBytes());
                    if (icc_prof.getNumComponents() == 1)
                        img.tagICC(icc_prof);
                }
                catch (RuntimeException e) {
                    //empty
                }
View Full Code Here

Examples of com.itextpdf.text.pdf.ICC_Profile

            img.setDpi(dpiX, dpiY);
            if (compression != TIFFConstants.COMPRESSION_OJPEG && compression != TIFFConstants.COMPRESSION_JPEG) {
                if (dir.isTagPresent(TIFFConstants.TIFFTAG_ICCPROFILE)) {
                    try {
                        TIFFField fd = dir.getField(TIFFConstants.TIFFTAG_ICCPROFILE);
                        ICC_Profile icc_prof = ICC_Profile.getInstance(fd.getAsBytes());
                        if (samplePerPixel - extraSamples == icc_prof.getNumComponents())
                            img.tagICC(icc_prof);
                    }
                    catch (RuntimeException e) {
                        //empty
                    }
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.color.ICC_Profile

        if (info == null)
            return null;
        if (info.issRGB())
            return null;

        ICC_Profile icc = ICC_Profile.getInstance(bytes);
        return icc;
    }
View Full Code Here

Examples of java.awt.color.ICC_Profile

            total = 0;
            for (int k = 0; k < icc.length; ++k) {
                System.arraycopy(icc[k], 14, ficc, total, icc[k].length - 14);
                total += icc[k].length - 14;
            }
            ICC_Profile icc_prof = ICC_Profile.getInstance(ficc);
            tagICC(icc_prof);
            icc = null;
        }
    }
View Full Code Here

Examples of java.awt.color.ICC_Profile

            Sanselan.writeImage(image, os, format, optional_params);

            // <b>get the image's embedded ICC Profile, if it has one. </b>
            byte iccProfileBytes[] = Sanselan.getICCProfileBytes(imageBytes);

            ICC_Profile iccProfile = Sanselan.getICCProfile(imageBytes);

            // <b>get the image's width and height. </b>
            Dimension d = Sanselan.getImageSize(imageBytes);

            // <b>get all of the image's info (ie. bits per pixel, size, transparency, etc.) </b>
View Full Code Here

Examples of java.awt.color.ICC_Profile

*/
public class ColorTools {

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

        ICC_ColorSpace cs = new ICC_ColorSpace(icc);

View Full Code Here

Examples of java.awt.color.ICC_Profile

                    + 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();

        IccProfileInfo info = parser.getICCProfileInfo(bytes);
        info.dump(prefix);
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.