Examples of addTIFFField()


Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

            TIFFDirectory tifd;
            try {
                tifd = metadata == null ? new TIFFDirectory(new TIFFTagSet[]{BaselineTIFFTagSet.getInstance()}, null) : TIFFDirectory.createFromMetadata(metadata);
                if (!_useTIFF_UnforcedRGB) {
                    tifd.removeTIFFField(ttagPhoto.getNumber());
                    tifd.addTIFFField(new TIFFField(ttagPhoto, BaselineTIFFTagSet.PHOTOMETRIC_INTERPRETATION_RGB));
                }
                if (tifd.containsTIFFField(ttagPhoto.getNumber())) {
                    int photometric = tifd.getTIFFField(ttagPhoto.getNumber()).getAsInt(0);
                    float[] referenceBlackWhite;
                    float[] ycbcrCoefficients = null;
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

                            referenceBlackWhite = null;
                            break;
                    }
                    if (referenceBlackWhite != null) {
                        tifd.removeTIFFField(ttagRefBW.getNumber());
                        tifd.addTIFFField(new TIFFField(ttagRefBW, TIFFTag.TIFF_FLOAT, 6, referenceBlackWhite));
                        if (ycbcrCoefficients != null) {
                            tifd.removeTIFFField(ttagCoeff.getNumber());
                            tifd.addTIFFField(new TIFFField(ttagCoeff, TIFFTag.TIFF_FLOAT, 3, ycbcrCoefficients));
                        }
                        if (DebugMap._getInstance().isDebuggerEnabled(Sprite.class) && DebugMap._getInstance().isDebugLevelEnabled(DebugMap._getInstance()._VOID)) {
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

                    if (referenceBlackWhite != null) {
                        tifd.removeTIFFField(ttagRefBW.getNumber());
                        tifd.addTIFFField(new TIFFField(ttagRefBW, TIFFTag.TIFF_FLOAT, 6, referenceBlackWhite));
                        if (ycbcrCoefficients != null) {
                            tifd.removeTIFFField(ttagCoeff.getNumber());
                            tifd.addTIFFField(new TIFFField(ttagCoeff, TIFFTag.TIFF_FLOAT, 3, ycbcrCoefficients));
                        }
                        if (DebugMap._getInstance().isDebuggerEnabled(Sprite.class) && DebugMap._getInstance().isDebugLevelEnabled(DebugMap._getInstance()._VOID)) {
                            System.out.print("TIFFField ReferenceBlackWhite ");
                            for (float f : referenceBlackWhite) {
                                System.out.print(" " + f);
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

                    }
                }
                if (_useTIFF_EXIF) {
                    TIFFTagSet exif = EXIFTIFFTagSet.getInstance();
                    tifd.addTagSet(exif);
                    tifd.addTIFFField(new TIFFField(exif.getTag(EXIFTIFFTagSet.TAG_EXIF_VERSION), TIFFTag.TIFF_UNDEFINED, 4, EXIFTIFFTagSet.EXIF_VERSION_2_2));
                }
                metadata = tifd.getAsMetadata();
            } catch (IIOInvalidTreeException ex) {
                if (DebugMap._getInstance().isDebuggerEnabled(Sprite.class)) {
                    ex.printStackTrace();
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

            // sofProcess -> Compression ?
            int compression = BaselineTIFFTagSet.COMPRESSION_JPEG;
            TIFFField compressionField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_COMPRESSION),
                              compression);
            dir.addTIFFField(compressionField);

            // samplePrecision -> BitsPerSample
            char[] bitsPerSample = new char[numFrameComponents];
            Arrays.fill(bitsPerSample, (char)(samplePrecision & 0xff));
            TIFFField bitsPerSampleField =
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

                new TIFFField(
                              base.getTag(BaselineTIFFTagSet.TAG_BITS_PER_SAMPLE),
                              TIFFTag.TIFF_SHORT,
                              bitsPerSample.length,
                              bitsPerSample);
            dir.addTIFFField(bitsPerSampleField);

            // numLines -> ImageLength
            TIFFField imageLengthField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_IMAGE_LENGTH),
                              numLines);
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

            // numLines -> ImageLength
            TIFFField imageLengthField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_IMAGE_LENGTH),
                              numLines);
            dir.addTIFFField(imageLengthField);

            // samplesPerLine -> ImageWidth
            TIFFField imageWidthField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_IMAGE_WIDTH),
                              samplesPerLine);
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

            // samplesPerLine -> ImageWidth
            TIFFField imageWidthField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_IMAGE_WIDTH),
                              samplesPerLine);
            dir.addTIFFField(imageWidthField);

            // numFrameComponents -> SamplesPerPixel
            TIFFField samplesPerPixelField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_SAMPLES_PER_PIXEL),
                              numFrameComponents);
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

            // numFrameComponents -> SamplesPerPixel
            TIFFField samplesPerPixelField =
                new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_SAMPLES_PER_PIXEL),
                              numFrameComponents);
            dir.addTIFFField(samplesPerPixelField);

            // componentId -> PhotometricInterpretation + ExtraSamples
            IIOMetadataNode chroma = getStandardChromaNode();
            if(chroma != null) {
                IIOMetadataNode csType =
View Full Code Here

Examples of com.sun.media.imageio.plugins.tiff.TIFFDirectory.addTIFFField()

                if(photometricInterpretation != -1) {
                    TIFFField photometricInterpretationField =
                        new TIFFField(base.getTag(BaselineTIFFTagSet.TAG_PHOTOMETRIC_INTERPRETATION),
                                      photometricInterpretation);
                    dir.addTIFFField(photometricInterpretationField);
                }

                if(hasAlpha) {
                    char[] extraSamples =
                        new char[] {BaselineTIFFTagSet.EXTRA_SAMPLES_ASSOCIATED_ALPHA};
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.