Class JPEGMetadataReader
java.lang.Object
is.galia.codec.jpeg.JPEGMetadataReader
Reads various metadata from a JPEG image.
This is far from a comprehensive reader—essentially it is a grab bag of functionality needed by various application components and plugins.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents a color transform in an Adobe APP14 marker segment. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JPEGMetadataReader
public JPEGMetadataReader()
-
-
Method Details
-
getColorTransform
- Returns:
- Color transform from the APP14 segment.
- Throws:
IOException
-
getEXIF
- Returns:
- EXIF data from the APP1 segment.
- Throws:
IOException
-
getEXIFOffset
- Returns:
- Offset of the EXIF IFD relative to the start of the stream, or
-1
if there is no EXIF IFD. - Throws:
IOException
-
getICCProfile
Reads an embedded ICC profile from an APP2 segment.
N.B.: ICC profiles can also be extracted from
IIOMetadata
objects, but as of JDK 11, the JDK Image I/O JPEG reader does not support JPEGs with CMYK color and will throw an exception before the metadata can be read.- Returns:
- ICC profile, or
null
if one is not contained in the stream. - Throws:
IOException
- See Also:
-
getIPTC
- Returns:
- IPTC data from the APP13 segment.
- Throws:
IOException
-
getWidth
- Throws:
IOException
-
getHeight
- Throws:
IOException
-
getThumbnailCompression
- Returns:
- Thumbnail compression value from EXIF data, or
-1
if there is no thumbnail. - Throws:
IOException
-
getThumbnailData
- Returns:
- Raw embedded thumbnail data from EXIF data, if available.
- Throws:
IOException
- See Also:
-
getXMP
- Returns:
- Fully formed XMP tree from one or more APP1 segments.
rdf:RDF
is the outermost element and some properties (especially large ones) may be removed. - Throws:
IOException
-
hasAdobeSegment
- Throws:
IOException
-
isProgressive
- Throws:
IOException
-
setSource
- Parameters:
inputStream
- Fresh stream from which to read the image.
-