com.groupdocs.metadata.core

Interfaces

Classes

Exceptions

com.groupdocs.metadata.core

Interface IExif

  • All Known Implementing Classes:
    HeifRootPackage, Jpeg2000RootPackage, JpegRootPackage, PngRootPackage, PsdRootPackage, TiffRootPackage, WebPRootPackage


    public interface IExif

    Defines base operations intended to work with EXIF metadata.

    Learn more

    This code sample demonstrates how to extract basic EXIF metadata properties.

    try (Metadata metadata = new Metadata(Constants.TiffWithExif)) {
         IExif root = (IExif) metadata.getRootPackage();
         if (root.getExifPackage() != null) {
             System.out.println(root.getExifPackage().getArtist());
             System.out.println(root.getExifPackage().getCopyright());
             System.out.println(root.getExifPackage().getImageDescription());
             System.out.println(root.getExifPackage().getMake());
             System.out.println(root.getExifPackage().getModel());
             System.out.println(root.getExifPackage().getSoftware());
             System.out.println(root.getExifPackage().getImageWidth());
             System.out.println(root.getExifPackage().getImageLength());
             // ...
             System.out.println(root.getExifPackage().getExifIfdPackage().getBodySerialNumber());
             System.out.println(root.getExifPackage().getExifIfdPackage().getCameraOwnerName());
             System.out.println(root.getExifPackage().getExifIfdPackage().getUserComment());
             // ...
             System.out.println(root.getExifPackage().getGpsPackage().getAltitude());
             System.out.println(root.getExifPackage().getGpsPackage().getLatitudeRef());
             System.out.println(root.getExifPackage().getGpsPackage().getLongitudeRef());
             // ...
         }
     }
     
    • Method Detail

      • getExifPackage

        ExifPackage getExifPackage()

        Gets the EXIF metadata package associated with the file.

        Returns:
        The EXIF metadata package associated with the file.
      • setExifPackage

        void setExifPackage(ExifPackage value)

        Sets the EXIF metadata package associated with the file.

        Parameters:
        value - The EXIF metadata package associated with the file.