Package org.apache.commons.imaging.formats.jpeg

# Class JpegImageMetadata

java.lang.Object
org.apache.commons.imaging.formats.jpeg.JpegImageMetadata

All Implemented Interfaces:
  `ImageMetadata`

public class JpegImageMetadata extends Object implements ImageMetadata

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.commons.imaging.common.ImageMetadata

  `ImageMetadata.ImageMetadataItem`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JpegImageMetadata(JpegPhotoshopMetadata photoshop, TiffImageMetadata exif)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dump()`
  `TiffField`
  `findExifValue(TagInfo tagInfo)`
  `TiffField`
  `findExifValueWithExactMatch(TagInfo tagInfo)`
  `TiffImageMetadata`
  `getExif()`
  `BufferedImage`
  `getExifThumbnail()`
  Gets the thumbnail image if available.
  `byte[]`
  `getExifThumbnailData()`
  Returns the data of the first JPEG thumbnail found in the EXIF metadata.
  `Dimension`
  `getExifThumbnailSize()`
  Returns the size of the first JPEG thumbnail found in the EXIF metadata.
  `List<ImageMetadata.ImageMetadataItem>`
  `getItems()`
  `JpegPhotoshopMetadata`
  `getPhotoshop()`
  `AbstractTiffImageData`
  `getRawImageData()`
  `String`
  `toString()`
  `String`
  `toString(String prefix)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### JpegImageMetadata

    public JpegImageMetadata(JpegPhotoshopMetadata photoshop, TiffImageMetadata exif)

- ## Method Details

  - ### dump

    public void dump()

  - ### findExifValue

    public TiffField findExifValue(TagInfo tagInfo)

  - ### findExifValueWithExactMatch

    public TiffField findExifValueWithExactMatch(TagInfo tagInfo)

  - ### getExif

    public TiffImageMetadata getExif()

  - ### getExifThumbnail

    public BufferedImage getExifThumbnail() throws ImagingException, IOException
    Gets the thumbnail image if available.
    Returns:
      the thumbnail image. May be `null` if no image could be found.
    Throws:
      `ImagingException` - if it fails to read the image
      `IOException` - if it fails to get the thumbnail or to read the image data

  - ### getExifThumbnailData

    public byte[] getExifThumbnailData()
    Returns the data of the first JPEG thumbnail found in the EXIF metadata.
    Returns:
      JPEG data or null if no thumbnail.

  - ### getExifThumbnailSize

    public Dimension getExifThumbnailSize() throws ImagingException, IOException
    Returns the size of the first JPEG thumbnail found in the EXIF metadata.
    Returns:
      Thumbnail width and height or null if no thumbnail.
    Throws:
      `ImagingException` - if it fails to read the image
      `IOException` - if it fails to read the image size

  - ### getItems

    public List<ImageMetadata.ImageMetadataItem> getItems()
    Specified by:
      `getItems` in interface `ImageMetadata`

  - ### getPhotoshop

    public JpegPhotoshopMetadata getPhotoshop()

  - ### getRawImageData

    public AbstractTiffImageData getRawImageData()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toString

    public String toString(String prefix)
    Specified by:
      `toString` in interface `ImageMetadata`