Package gov.nih.mipav.model.file
Class MetadataExtractor.IccReader
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractor.IccReader
-
- All Implemented Interfaces:
MetadataExtractor.JpegSegmentMetadataReader
,MetadataExtractor.MetadataReader
- Enclosing class:
- MetadataExtractor
public class MetadataExtractor.IccReader extends java.lang.Object implements MetadataExtractor.JpegSegmentMetadataReader, MetadataExtractor.MetadataReader
Reads an ICC profile.More information about ICC:
- http://en.wikipedia.org/wiki/ICC_profile
- http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/ICC_Profile.html
- https://developer.apple.com/library/mac/samplecode/ImageApp/Listings/ICC_h.html
- Author:
- Yuri Binev, Drew Noakes https://drewnoakes.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
JPEG_SEGMENT_PREAMBLE
-
Constructor Summary
Constructors Constructor Description IccReader()
-
Method Summary
-
-
-
Field Detail
-
JPEG_SEGMENT_PREAMBLE
public 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.RandomAccessReader reader, MetadataExtractor.Metadata metadata)
Description copied from interface:MetadataExtractor.MetadataReader
Extracts metadata fromreader
and merges it into the specifiedMetadataExtractor.Metadata
object.- Specified by:
extract
in interfaceMetadataExtractor.MetadataReader
- Parameters:
reader
- TheMetadataExtractor.RandomAccessReader
from which the metadata should be extracted.metadata
- TheMetadataExtractor.Metadata
object into which extracted values should be merged.
-
extract
public void extract(MetadataExtractor.RandomAccessReader reader, MetadataExtractor.Metadata metadata, MetadataExtractor.Directory parentDirectory)
-
set4ByteString
private void set4ByteString(MetadataExtractor.Directory directory, int tagType, MetadataExtractor.RandomAccessReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
setInt32
private void setInt32(MetadataExtractor.Directory directory, int tagType, MetadataExtractor.RandomAccessReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
setInt64
private void setInt64(MetadataExtractor.Directory directory, int tagType, MetadataExtractor.RandomAccessReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
setDate
private void setDate(MetadataExtractor.IccDirectory directory, int tagType, MetadataExtractor.RandomAccessReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
getStringFromInt32
public java.lang.String getStringFromInt32(int d)
-
-