Examples of ICC_Profile


Examples of java.awt.color.ICC_Profile

            PNGChunk pngChunktRNS = (PNGChunk) tRNSs.get(0);
            transparencyFilter = getTransparencyFilter(pngChunkIHDR.colorType,
                    pngChunktRNS);
        }

        ICC_Profile icc_profile = null;
        GammaCorrection gammaCorrection = null;
        {
            ArrayList sRGBs = filterChunks(chunks, sRGB);
            ArrayList gAMAs = filterChunks(chunks, gAMA);
            ArrayList iCCPs = filterChunks(chunks, iCCP);
View Full Code Here

Examples of 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

        InputStream profile = null;
        ColorSpace cSpace = null;
        try
        {
            profile = stream.createInputStream();
            ICC_Profile iccProfile = ICC_Profile.getInstance( profile );
            cSpace = new ICC_ColorSpace( iccProfile );
        }
        finally
        {
            if( profile != null )
View Full Code Here

Examples of java.awt.color.ICC_Profile

        {
            InputStream profile = null;
            try
            {
                profile = ResourceLoader.loadResource( "Resources/colorspace-profiles/CMYK.pf" );
                ICC_Profile iccProfile = ICC_Profile.getInstance( profile );
                cSpace = new ICC_ColorSpace( iccProfile );
            }
            finally
            {
                if( profile != null )
View Full Code Here

Examples of java.awt.color.ICC_Profile

    public void setJobName(String name) {
        jobName = name;
    }

    public void print(ImageEditorEngine engine, ProgressThread thread, PageFormat format, PrintSettings settings) throws PrinterException {
        ICC_Profile colorProfile = settings.getColorProfile() != null
                                   ? settings.getColorProfile()
                                   : JAIContext.sRGBColorProfile;

        MacOSXPrinter.setPageFormat( format );

        // In Cocoa there is no way of really controlling the print resolution,
        // we always print at full size and then rely on the printer to do the appropriate scaling...

        RenderedImage rendering = engine.getRendering(engine.getNaturalSize(),
                                                      colorProfile,
                                                      engine.getLCMSIntent(settings.getRenderingIntent()),
                                                      true);

        try {
            File spoolFile = File.createTempFile("LZPrintSpool", "tif");
            LCTIFFWriter writer = new LCTIFFWriter(spoolFile.getAbsolutePath(),
                                                   rendering.getWidth(),
                                                   rendering.getHeight());
            // No profile for Application Managed Colors
            if (colorProfile == JAIContext.sRGBColorProfile)
                writer.setByteField( TIFFTags.TIFF_ICC_PROFILE, colorProfile.getData());
            writer.putImageStriped(rendering, thread);

            if (!thread.isCanceled())
                MacOSXPrinter.print(jobName, spoolFile, settings.getPrintBounds());
View Full Code Here

Examples of java.awt.color.ICC_Profile

        }

        RenderedImage source = null;
        RenderedImage dest = null;
        if ( imageFile.exists() && imageFile.canRead() ) {
            ICC_Profile profile = null;
            RenderedImage ri = null;

            try {
                ImageInfo imageInfo = ImageInfo.getInstanceFor( imageFile );
                ri = imageInfo.getImage( null );
View Full Code Here

Examples of java.awt.color.ICC_Profile

     * @param imageInfo The {@link ImageMetadata} to add into.
     */
    private void addColorProfile( ImageInfo imageInfo ) {
        removeValue( CORE_COLOR_PROFILE );
        try {
            final ICC_Profile profile =
                imageInfo.getImageType().getICCProfile( imageInfo );
            if ( profile == null )
                return;
            final String name = ColorProfileInfo.getNameOf( profile );
            if ( name != null )
View Full Code Here

Examples of java.awt.color.ICC_Profile

            WindowsColorProfileManager.getSystemDisplayProfilePath();
        if ( path == null )
            return null;
        try {
            final InputStream in = new File( path ).toURL().openStream();
            final ICC_Profile profile = ICC_Profile.getInstance( in );
            System.out.println(
                "Display profile " + ColorProfileInfo.getNameOf( profile )
            );
            return profile;
        }
View Full Code Here

Examples of java.awt.color.ICC_Profile

        final File[] files =
            profileDir.listFiles( ICC_ProfileFileFilter.INSTANCE );
        for ( File file : files ) {
            final String path = file.getAbsolutePath();
            try {
                final ICC_Profile profile = ICC_Profile.getInstance( path );
                final String name = ColorProfileInfo.getNameOf( profile );
                m_profiles.add( new ColorProfileInfo( name, path ) );
            }
            catch ( IOException e ) {
                // Trouble reading the file
View Full Code Here

Examples of java.awt.color.ICC_Profile

  ColorConvertOp op = (ColorConvertOp) colorConvertOpBuf.get(hashcode);

  if (op == null) {
            if (src instanceof ICC_ColorSpace && dst instanceof ICC_ColorSpace) {
                // ICC_Profile srcProfile = ((ICC_ColorSpace) src).getProfile();
                ICC_Profile dstProfile = ((ICC_ColorSpace) dst).getProfile();

                // srcProfile = ICC_Profile.getInstance(srcProfile.getData());
                dstProfile = ICC_Profile.getInstance(dstProfile.getData());

                /*if (getRenderingIntent(srcProfile) != renderingIntent.getValue()) {
                    srcProfile = ICC_Profile.getInstance(srcProfile.getData());
                    setRenderingIntent(srcProfile, renderingIntent.getValue());
                    src = new ICC_ColorSpace(srcProfile);
                }*/

                if (renderingIntent != LCColorConvertDescriptor.DEFAULT
                    && getRenderingIntent(dstProfile) != renderingIntent.getValue())
                {
                    dstProfile = ICC_Profile.getInstance(dstProfile.getData());
                    setRenderingIntent(dstProfile, renderingIntent.getValue());
                    dst = new ICC_ColorSpace(dstProfile);
                }
            }

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.