Examples of IccReader

@author Yuri Binev, Drew Noakes

Examples of com.drew.metadata.icc.IccReader

        // Loop through all APP2 segments, looking for something we can process.
        for (byte[] app2Segment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APP2)) {
            if (app2Segment.length > 10 && new String(app2Segment, 0, 11).equalsIgnoreCase("ICC_PROFILE")) {
                byte[] icc = new byte[app2Segment.length-14];
                System.arraycopy(app2Segment, 14, icc, 0, app2Segment.length-14);
                new IccReader().extract(new ByteArrayReader(icc), metadata);
            }
        }

        // Loop through all APPD segments, checking the leading bytes to identify the format of each.
        for (byte[] appdSegment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APPD)) {
View Full Code Here

Examples of com.drew.metadata.icc.IccReader

                    // Only compression method allowed by the spec is zero: deflate
                    // This assumes 1-byte-per-char, which it is by spec.
                    int bytesLeft = bytes.length - profileName.length() - 2;
                    byte[] compressedProfile = reader.getBytes(bytesLeft);
                    InflaterInputStream inflateStream = new InflaterInputStream(new ByteArrayInputStream(compressedProfile));
                    new IccReader().extract(new RandomAccessStreamReader(inflateStream), metadata);
                    inflateStream.close();
                }
            } else if (chunkType.equals(PngChunkType.bKGD)) {
                PngDirectory directory = metadata.getOrCreateDirectory(PngDirectory.class);
                directory.setByteArray(PngDirectory.TAG_BACKGROUND_COLOR, bytes);
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.