public abstract class ImageRootPackage extends RootMetadataPackage
Provides a base abstract class for all image root packages.
This code sample demonstrates how to extract common image properties such as width and height, MIME type, byte order, etc.
try (Metadata metadata = new Metadata(Constants.InputPng)) { ImageRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getImageType().getFileFormat()); System.out.println(root.getImageType().getByteOrder()); System.out.println(root.getImageType().getMimeType()); System.out.println(root.getImageType().getExtension()); System.out.println(root.getImageType().getWidth()); System.out.println(root.getImageType().getHeight()); }
Modifier and Type | Method and Description |
---|---|
ImageTypePackage |
getImageType()
Gets the file type metadata package.
|
getFileType, sanitize
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final ImageTypePackage getImageType()
Gets the file type metadata package.