Package java.awt.color

Examples of java.awt.color.ICC_ColorSpace


    private final ICC_ColorSpace colorSpace;

    public ICCProfileWrapper(final ICC_Profile _profile)
    {
        this.profile = _profile;
        this.colorSpace = new ICC_ColorSpace(_profile);
    }
View Full Code Here


                    // FOP URI resolver did not find ICC profile - perhaps the
                    // Java VM can find it?
                    // iccProfile = ICC_Profile.getInstance(iccProfileSrc);
                }
                if (iccProfile != null) {
                    colorSpace = new ICC_ColorSpace(iccProfile);
                }
            } catch (Exception e) {
                // Ignore exception - will be logged a bit further down
                // (colorSpace == null case)
            }
View Full Code Here

        ColorSpace cSpace = null;
        try
        {
            profile = stream.createInputStream();
            ICC_Profile iccProfile = ICC_Profile.getInstance( profile );
            cSpace = new ICC_ColorSpace( iccProfile );
            // there maybe a ProfileDataException or a CMMException as there
            // are some issues when loading ICC_Profiles, see PDFBOX-1295
            // Try to create a color as test ...
            new Color(cSpace,new float[getNumberOfComponents()],1f);
        }
View Full Code Here

    private final ICC_ColorSpace colorSpace;

    public ICCProfileWrapper(final ICC_Profile _profile)
    {
        this.profile = _profile;
        this.colorSpace = new ICC_ColorSpace(_profile);
    }
View Full Code Here

                                             palette,
                                             palette);
        } else {
            colorModel =
                ImageCodec.createComponentColorModel(sampleModel,
        iccProfile == null ? null : new ICC_ColorSpace(iccProfile));
        }
    }
View Full Code Here

                    profile = null;
                }

                if (profile != null) {
                    try {
                        cs = new ICC_ColorSpace(profile);
                    } catch (Exception ignore) {
                        cs = null;
                    }
                }
            }
View Full Code Here

    private static ColorSpace deserializeColorSpace(ObjectInputStream in)
        throws IOException {
            ColorSpace cs = null;
            int colorSpaceType = in.readInt();
            if(colorSpaceType == COLORSPACE_ICC) {
                cs = new ICC_ColorSpace(ICC_Profile.getInstance(in));
            } else if(colorSpaceType == COLORSPACE_PREDEFINED) {
                cs = ColorSpace.getInstance(in.readInt());
            } else if(colorSpaceType == COLORSPACE_UNKNOWN) {
                // Create probable ColorSpaces for 1- and 3-band cases.
                switch(in.readInt()) {
View Full Code Here

        String CMYKprofile=System.getProperty("org.jpedal.CMYKprofile");

        if(CMYKprofile!=null){           
       
            try {
                CMYK=new ICC_ColorSpace(ICC_Profile.getInstance(new FileInputStream(CMYKprofile)));
            } catch (Exception e) {
                throw new RuntimeException("Unable to create CMYK colorspace with  "+CMYKprofile+"\nPlease check Path and file valid or use built-in");
            }
        }
View Full Code Here

        switch (colorspace) {
            case ColorSpace.TYPE_CMY:
                synchronized (ColorSpace.class) {
                    if (CMYspace == null) {
                        ICC_Profile theProfile = getICC_Profile(CMY_PROFILE_NAME);
                        CMYspace = new ICC_ColorSpace(theProfile);
                    }

                    theColorSpace = CMYspace;
                }
                break;

            case ColorSpace.TYPE_CMYK:
                synchronized (ColorSpace.class) {
                    if (CMYKspace == null) {
                        ICC_Profile theProfile = getICC_Profile(CMYK_PROFILE_NAME);
                        CMYKspace = new ICC_ColorSpace(theProfile);
                    }

                    theColorSpace = CMYKspace;
                }
                break;
View Full Code Here

      if(LogWriter.isOutput())
        LogWriter.writeLog("Error in ICC data");
        }else {
      try{
        cs = new ICC_ColorSpace(ICC_Profile.getInstance(icc_data));
      }catch(Exception e){
        if(LogWriter.isOutput())
          LogWriter.writeLog("[PDF] Problem "+e.getMessage()+" with ICC data ");
        failed=true;
      }
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.