Package java.awt.color

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


            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

        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

  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

                TIFF_COMPRESSION,
                tiffOptions.lzwCompression.getValue() ?
                    TIFF_COMPRESSION_LZW : TIFF_COMPRESSION_NONE
            );

            ICC_Profile profile = ColorProfileInfo.getExportICCProfileFor(
                tiffOptions.colorProfile.getValue()
            );
            if ( profile == null )
                profile = JAIContext.sRGBExportColorProfile;
            writer.setICCProfile( profile );
View Full Code Here

                                 int maxWidth, int maxHeight )
        throws BadImageFileException, IOException, UserCanceledException,
               UnknownImageTypeException
    {
        try {
            ICC_Profile profile;
            try {
                profile = getICCProfile( imageInfo );
            }
            catch ( ColorProfileException e ) {
                profile = null;
View Full Code Here

        final ByteBuffer exifSegBuf =
            getFirstSegment( imageInfo, JPEG_APP1_MARKER );
        if ( exifSegBuf == null )
            return null;

        final ICC_Profile profile = getICCProfile( imageInfo );

        return getImageFromBuffer(
            new ArrayByteBuffer( exifSegBuf ),
            dir.getValue( EXIF_JPEG_INTERCHANGE_FORMAT ),
            EXIF_HEADER_START_SIZE,
View Full Code Here

        if (((PlanarImage) image).getSampleModel().getDataType() == DataBuffer.TYPE_USHORT)
            image = Functions.fromUShortToByte(image, null); */

        if (!colorMode && image.getColorModel().getNumColorComponents() == 3) {
            ICC_Profile profile = ((ICC_ColorSpace) (image.getColorModel().getColorSpace())).getProfile();

            if (!(profile instanceof ICC_ProfileRGB)) {
                image = Functions.toColorSpace(image, JAIContext.sRGBColorSpace, null);
                profile = ((ICC_ColorSpace) (image.getColorModel().getColorSpace())).getProfile();
            }
View Full Code Here

        final ImageType exportType = exportOptions.getImageType();
        final int exportWidth = fileOptions.resizeWidth.getValue();
        final int exportHeight = fileOptions.resizeHeight.getValue();

        final String exportProfileName = fileOptions.colorProfile.getValue();
        ICC_Profile profile =
            ColorProfileInfo.getExportICCProfileFor( exportProfileName );
        if ( profile == null )
            profile = JAIContext.sRGBExportColorProfile;

        // LZN editor state data
View Full Code Here

        TIFF_Format() throws LCImageLibException {
            if (bitsPerSample != 8 && bitsPerSample != 16)
                throw new LCImageLibException("Unsupported TIFF Bit per Sample Value: " + bitsPerSample);

            ICC_Profile iccProfile = null;
            try {
                iccProfile = getICCProfile();
                // TODO: deal with weird photometric interpretations
                if ( iccProfile == null && photometric == TIFF_PHOTOMETRIC_CIELAB )
                    iccProfile = JAIContext.labProfile;
View Full Code Here

TOP

Related Classes of java.awt.color.ICC_Profile

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.