com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class ExifPackage

  • All Implemented Interfaces:
    Iterable<MetadataProperty>


    public class ExifPackage
    extends ExifDictionaryBasePackage

    Represents an EXIF metadata package (Exchangeable Image File Format).

    Learn more

    This code sample demonstrates how to update common EXIF properties.

    
     try (Metadata metadata = new Metadata(Constants.InputJpeg)) {
         IExif root = (IExif) metadata.getRootPackage();
         // Set the EXIF package if it's missing
         if (root.getExifPackage() == null) {
             root.setExifPackage(new ExifPackage());
         }
         root.getExifPackage().setCopyright("Copyright (C) 2011-2022 GroupDocs. All Rights Reserved.");
         root.getExifPackage().setImageDescription("test image");
         root.getExifPackage().setSoftware("GroupDocs.Metadata");
         // ...
         root.getExifPackage().getExifIfdPackage().setBodySerialNumber("test");
         root.getExifPackage().getExifIfdPackage().setCameraOwnerName("GroupDocs");
         root.getExifPackage().getExifIfdPackage().setUserComment("test comment");
         // ...
         metadata.save(Constants.OutputJpeg);
     }
     
    • Constructor Detail

      • ExifPackage

        public ExifPackage()

        Initializes a new instance of the ExifPackage class.

    • Method Detail

      • getGpsPackage

        public final ExifGpsPackage getGpsPackage()

        Gets the GPS data.

        Returns:
        The GPS data.
      • getExifIfdPackage

        public final ExifIfdPackage getExifIfdPackage()

        Gets the EXIF IFD data.

        Returns:
        The EXIF IFD data.
      • getThumbnail

        public final byte[] getThumbnail()

        Gets the image thumbnail represented as an array of bytes.

        Returns:
        The image thumbnail represented as an array of bytes.


        This feature is not available in trial mode.
      • getArtist

        public final String getArtist()

        Gets the name of the camera owner, photographer or image creator.

        Returns:
        The name of the camera owner, photographer or image creator.
      • setArtist

        public final void setArtist(String value)

        Sets the name of the camera owner, photographer or image creator.

        Parameters:
        value - The name of the camera owner, photographer or image creator.
      • getCopyright

        public final String getCopyright()

        Gets the copyright notice.

        Returns:
        The copyright notice.
      • setCopyright

        public final void setCopyright(String value)

        Sets the copyright notice.

        Parameters:
        value - The copyright notice.
      • getDateTime

        public final String getDateTime()

        Gets the date and time of image creation. In the EXIF standard, it is the date and time the file was changed.

        Returns:
        The date and time of image creation.
      • setDateTime

        public final void setDateTime(String value)

        Sets the date and time of image creation. In the EXIF standard, it is the date and time the file was changed.

        Parameters:
        value - The date and time of image creation.
      • getImageDescription

        public final String getImageDescription()

        Gets a character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like.

        Returns:
        The image description.
      • setImageDescription

        public final void setImageDescription(String value)

        Sets a character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like.

        Parameters:
        value - The image description.
      • getImageLength

        public final int getImageLength()

        Gets the number of rows of image data.

        Returns:
        The number of rows of image data.
      • setImageLength

        public final void setImageLength(int value)

        Sets the number of rows of image data.

        Parameters:
        value - The number of rows of image data.
      • getImageWidth

        public final int getImageWidth()

        Gets the number of columns of image data, equal to the number of pixels per row.

        Returns:
        The number of columns of image data, equal to the number of pixels per row.
      • setImageWidth

        public final void setImageWidth(int value)

        Sets the number of columns of image data, equal to the number of pixels per row.

        Parameters:
        value - The number of columns of image data, equal to the number of pixels per row.
      • getMake

        public final String getMake()

        Gets the manufacturer of the recording equipment. This is the manufacturer of the DSC, scanner, video digitizer or other equipment that generated the image.

        Returns:
        The manufacturer of the recording equipment.
      • setMake

        public final void setMake(String value)

        Sets the manufacturer of the recording equipment. This is the manufacturer of the DSC, scanner, video digitizer or other equipment that generated the image.

        Parameters:
        value - The manufacturer of the recording equipment.
      • getModel

        public final String getModel()

        Gets the model name or model number of the equipment. This is the model name or number of the DSC, scanner, video digitizer or other equipment that generated the image.

        Returns:
        The model name or model number of the equipment.
      • setModel

        public final void setModel(String value)

        Sets the model name or model number of the equipment. This is the model name or number of the DSC, scanner, video digitizer or other equipment that generated the image.

        Parameters:
        value - The model name or model number of the equipment.
      • getSoftware

        public final String getSoftware()

        Gets the name and version of the software or firmware of the camera or image input device used to generate the image.

        Returns:
        The name and version of the software or firmware of the camera or image input device used to generate the image.
      • setSoftware

        public final void setSoftware(String value)

        Sets the name and version of the software or firmware of the camera or image input device used to generate the image.

        Parameters:
        value - The name and version of the software or firmware of the camera or image input device used to generate the image.