Package com.drew.metadata.xmp

Examples of com.drew.metadata.xmp.XmpReader


        for (byte[] app1Segment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APP1)) {
            if (app1Segment.length > 3 && "EXIF".equalsIgnoreCase(new String(app1Segment, 0, 4)))
                new ExifReader().extract(new ByteArrayReader(app1Segment), metadata);

            if (app1Segment.length > 27 && "http://ns.adobe.com/xap/1.0/".equalsIgnoreCase(new String(app1Segment, 0, 28)))
                new XmpReader().extract(new ByteArrayReader(app1Segment), metadata);
        }

        // 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")) {
View Full Code Here


                }

                if (text != null) {
                    if (keyword.equals("XML:com.adobe.xmp")) {
                        // NOTE in testing images, the XMP has parsed successfully, but we are not extracting tags from it as necessary
                        new XmpReader().extract(text, metadata);
                    } else {
                        textPairs.add(new KeyValuePair(keyword, text));
                    }
                }
            } else if (chunkType.equals(PngChunkType.tIME)) {
View Full Code Here

TOP

Related Classes of com.drew.metadata.xmp.XmpReader

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.