Package gov.nih.mipav.model.file
Class MetadataExtractor.PhotoshopReader
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractor.PhotoshopReader
-
- All Implemented Interfaces:
MetadataExtractor.JpegSegmentMetadataReader
- Enclosing class:
- MetadataExtractor
public class MetadataExtractor.PhotoshopReader extends java.lang.Object implements MetadataExtractor.JpegSegmentMetadataReader
Reads metadata created by Photoshop and stored in the APPD segment of JPEG files. Note that IPTC data may be stored within this segment, in which case this reader will create both aMetadataExtractor.PhotoshopDirectory
and acom.drew.metadata.iptc.IptcDirectory
.- Author:
- Drew Noakes https://drewnoakes.com, Yuri Binev, Payton Garland
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
JPEG_SEGMENT_PREAMBLE
-
Constructor Summary
Constructors Constructor Description PhotoshopReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extract(MetadataExtractor.SequentialReader reader, int length, MetadataExtractor.Metadata metadata)
void
extract(MetadataExtractor.SequentialReader reader, int length, MetadataExtractor.Metadata metadata, MetadataExtractor.Directory parentDirectory)
java.lang.Iterable<MetadataExtractor.JpegSegmentType>
getSegmentTypes()
Gets the set of JPEG segment types that this reader is interested in.void
readJpegSegments(java.lang.Iterable<byte[]> segments, MetadataExtractor.Metadata metadata, MetadataExtractor.JpegSegmentType segmentType)
Extracts metadata from all instances of a particular JPEG segment type.
-
-
-
Field Detail
-
JPEG_SEGMENT_PREAMBLE
private static final java.lang.String JPEG_SEGMENT_PREAMBLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSegmentTypes
public java.lang.Iterable<MetadataExtractor.JpegSegmentType> getSegmentTypes()
Description copied from interface:MetadataExtractor.JpegSegmentMetadataReader
Gets the set of JPEG segment types that this reader is interested in.- Specified by:
getSegmentTypes
in interfaceMetadataExtractor.JpegSegmentMetadataReader
-
readJpegSegments
public void readJpegSegments(java.lang.Iterable<byte[]> segments, MetadataExtractor.Metadata metadata, MetadataExtractor.JpegSegmentType segmentType)
Description copied from interface:MetadataExtractor.JpegSegmentMetadataReader
Extracts metadata from all instances of a particular JPEG segment type.- Specified by:
readJpegSegments
in interfaceMetadataExtractor.JpegSegmentMetadataReader
- Parameters:
segments
- A sequence of byte arrays from which the metadata should be extracted. These are in the order encountered in the original file.metadata
- TheMetadataExtractor.Metadata
object into which extracted values should be merged.segmentType
- TheMetadataExtractor.JpegSegmentType
being read.
-
extract
public void extract(MetadataExtractor.SequentialReader reader, int length, MetadataExtractor.Metadata metadata)
-
extract
public void extract(MetadataExtractor.SequentialReader reader, int length, MetadataExtractor.Metadata metadata, MetadataExtractor.Directory parentDirectory)
-
-