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 and Description
    `JpegImageMetadata(JpegPhotoshopMetadata photoshop, TiffImageMetadata exif)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dump()`
    `TiffField` | `findEXIFValue(TagInfo tagInfo)`
    `TiffField` | `findEXIFValueWithExactMatch(TagInfo tagInfo)`
    `TiffImageMetadata` | `getExif()`
    `BufferedImage` | `getEXIFThumbnail()` Get 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()`
    `TiffImageData` | `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 Detail

    - #### JpegImageMetadata

          public JpegImageMetadata(JpegPhotoshopMetadata photoshop,
                                   TiffImageMetadata exif)

  - ### Method Detail

    - #### getExif

          public TiffImageMetadata getExif()

    - #### getPhotoshop

          public JpegPhotoshopMetadata getPhotoshop()

    - #### findEXIFValue

          public TiffField findEXIFValue(TagInfo tagInfo)

    - #### findEXIFValueWithExactMatch

          public TiffField findEXIFValueWithExactMatch(TagInfo tagInfo)

    - #### getEXIFThumbnailSize

          public Dimension getEXIFThumbnailSize()
                                         throws ImageReadException,
                                                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:
        `ImageReadException` - if it fails to read the image
        `IOException` - if it fails to read the image size

    - #### getEXIFThumbnailData

          public byte[] getEXIFThumbnailData()
                                      throws ImageReadException,
                                             IOException

      Returns the data of the first JPEG thumbnail found in the EXIF metadata.
      Returns:
        JPEG data or null if no thumbnail.
      Throws:
        `ImageReadException` - if it fails to read the image
        `IOException` - if an IO error occurred

    - #### getEXIFThumbnail

          public BufferedImage getEXIFThumbnail()
                                         throws ImageReadException,
                                                IOException

      Get the thumbnail image if available.
      Returns:
        the thumbnail image. May be `null` if no image could be found.
      Throws:
        `ImageReadException` - if it fails to read the image
        `IOException` - if it fails to get the thumbnail or to read the image data

    - #### getRawImageData

          public TiffImageData getRawImageData()

    - #### getItems

          public List<ImageMetadata.ImageMetadataItem> getItems()

      Specified by:
        `getItems` in interface `ImageMetadata`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(String prefix)

      Specified by:
        `toString` in interface `ImageMetadata`

    - #### dump

          public void dump()

Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.