Class JPEG
The headers found in a JPEG file.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ImageFileFormat
format()
The associatedImageFileFormat
with this header.protected Optional
<ImageMetadata> populateFromMetadata
(com.drew.metadata.Metadata metadata, ImageFileAttributes attributes) Creates aImageMetadata
, if possible, frommetadata
.Methods inherited from class org.anchoranalysis.plugin.io.bean.metadata.header.HeaderFormat
populateFrom
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
JPEG
public JPEG()
-
-
Method Details
-
format
Description copied from class:HeaderFormat
The associatedImageFileFormat
with this header.Only files whose paths end with an extension for this format will be accepted.
- Specified by:
format
in classHeaderFormat
- Returns:
- the format.
-
populateFromMetadata
protected Optional<ImageMetadata> populateFromMetadata(com.drew.metadata.Metadata metadata, ImageFileAttributes attributes) throws ImageIOException Description copied from class:HeaderFormat
Creates aImageMetadata
, if possible, frommetadata
.- Specified by:
populateFromMetadata
in classHeaderFormat
- Parameters:
metadata
- theMetadata
to inferImageMetadata
from.attributes
- timestamps and other file-attributes associated with the metadata.- Returns:
- the inferred metadata, if it was possible to infer it.
- Throws:
ImageIOException
- if the metadata does not meet expectations.
-