Metadata

Corresponding to an image is a set of non-pixel data that represents properties of that image. Some examples are width, height, color table, color space, and so on. Although there are ImageReader methods for obtaining the image width and height(such as getWidth and getHeight), it is not possible to provide a separate method for each piece of metadata that could be contained in an image format. Instead, the ImageReader class provides the metadata information collectively using the following two methods:

IIOMetadata getImageMetadata(int imageIndex)

and

IIOMetadata getStreamMetadata()

The first method provides the metadata for the image specified by the index imageIndex, while the second method provides the metadata that is descriptive ...

Get Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.