com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class JpegFormat

    • Constructor Detail

      • JpegFormat

        public JpegFormat(String fileName)

        Initializes a new instance of the JpegFormat class.

        Parameters:
        fileName - Absolute path to the file.
      • JpegFormat

        public JpegFormat(InputStream input)

        Initializes a new instance of the JpegFormat class.

        Parameters:
        input - File stream.
    • Method Detail

      • getType

        public int getType()

        Gets document type.

        Specified by:
        getType in class FormatBase
        Returns:
        Document type.
      • hasXmp

        public final boolean hasXmp()

        Gets a value indicating whether JpegFormat contains XMP data.

        Specified by:
        hasXmp in interface IXmp
        Returns:
        true if JPEG has XMP; otherwise, false.
      • getExifValues

        public final ExifInfo getExifValues()

        Gets ExifInfo. Provides access for all EXIF properties.

        Specified by:
        getExifValues in interface IExif
        Returns:
        The EXIF data. Null if EXIF data is not presented.
      • getXmpValues

        public final XmpEditableCollection getXmpValues()

        Gets XmpEditableCollection. Provides access for all XMP properties in edit mode.

        Specified by:
        getXmpValues in interface IXmp
        Returns:
        XMP values.
      • hasIptc

        public final boolean hasIptc()

        Gets a value indicating whether JPEG contains IPTC IIM metadata.

        Specified by:
        hasIptc in interface IIptc
        Returns:
        true if image has IPTC IIM metadata; otherwise, false.
      • hasBarCodes

        public final boolean hasBarCodes()

        Gets a value indicating whether image has barcodes.

        Specified by:
        hasBarCodes in interface IBarCodeDetector
        Returns:
        true if file has bar codes; otherwise, false.
      • hasImageResourceBlocks

        public final boolean hasImageResourceBlocks()

        Gets a value indicating whether file contains Photoshop Image Resource Blocks.

        Specified by:
        hasImageResourceBlocks in interface IImageResourceBlocks
        Returns:
        true if file has image resource blocks; otherwise, false.
      • getExifInfo

        public final ExifInfo getExifInfo()

        Returns EXIF data.

        Specified by:
        getExifInfo in interface IExif
        Returns:
        ExifInfo if image contains EXIF data; otherwise null.
      • removeExifInfo

        public final boolean removeExifInfo()

        Removes EXIF metadata.

        Specified by:
        removeExifInfo in interface IExif
        Returns:
        True if EXIF data removed; otherwise false.


        This feature is not available in trial mode.

      • removeGpsLocation

        public final boolean removeGpsLocation()

        Removes GPS coordinates of the photo.

        Specified by:
        removeGpsLocation in interface IExif
        Returns:
        True if location removed; otherwise false.


        This feature is not available in trial mode.

      • getGpsLocation

        public final GpsLocation getGpsLocation()

        Gets GPS coordinates where a photo was taken.

        Specified by:
        getGpsLocation in interface IExif
        Returns:
        GpsLocation if image contains GPS coordinates.


        This feature is not available in trial mode.

      • setExifInfo

        public final boolean setExifInfo(ExifInfo exifInfo)

        Writes EXIF data.

        Parameters:
        exifInfo - The EXIF information.


        This feature is not available in trial mode.

        Returns:
        true if EXIF updated successfully; otherwise false.
        Throws:
        ArgumentNullException - EXIF data could not be null.
        ArgumentNullException - EXIF data could not be null.
      • updateExifInfo

        public final boolean updateExifInfo(ExifInfo exifInfo)

        Updates EXIF data in Jpeg format.

        Specified by:
        updateExifInfo in interface IExif
        Parameters:
        exifInfo - EXIF data.
        Returns:
        True if EXIF data has been updated; otherwise false.
      • getMakernotes

        public final MakerNotesBase getMakernotes()

        Gets the makernotes from EXIF.

        Returns:
        MakerNotesBase.
        Throws:
        GroupDocsException - Could not read makernotes.
      • getXmpData

        public final XmpPacketWrapper getXmpData()

        Returns the XMP packet.

        Specified by:
        getXmpData in interface IXmp
        Returns:
        XmpPacketWrapper if XMP data is presented, otherwise null.
      • getXmpProperties

        public final XmpProperties getXmpProperties()

        Returns all XMP properties presented in JpegFormat.

        Specified by:
        getXmpProperties in interface IXmp
        Returns:
        XmpProperties if XMP data is presented; otherwise null.
      • setXmpData

        public final boolean setXmpData(XmpPacketWrapper package_)

        Updates XMP packages.

        Specified by:
        setXmpData in interface IXmp
        Parameters:
        package - XMP packet wrapper.
        Returns:
        True if the XMP is successfully updated; otherwise, false.
        Throws:
        ArgumentNullException - Package could not be null.
      • removeXmpData

        public final void removeXmpData()

        Removes all XMP data.


        This feature is not available in trial mode.

        Specified by:
        removeXmpData in interface IXmp
      • getDublinCore

        public final DublinCoreMetadata getDublinCore()

        Gets Dublin Core metadata.

        Specified by:
        getDublinCore in interface IDublinCore
        Returns:
        DublinCoreMetadata if Dublin Core metadata is presented; otherwise null.


        This feature is not supported in trial mode.

      • getIptc

        public final IptcCollection getIptc()

        Gets the IPTC collection.

        Specified by:
        getIptc in interface IIptc
        Returns:
        IptcCollection.
      • updateIptc

        public final void updateIptc(IptcCollection collection)

        Updates IPTC metadata.

        Specified by:
        updateIptc in interface IIptc
        Parameters:
        collection - IPTC collection.
        Throws:
        ArgumentNullException - Collection could not be null.
      • updateIptc

        public final void updateIptc(IptcDataSet dataSet)

        Updates specific IPTC dataset.

        Specified by:
        updateIptc in interface IIptc
        Parameters:
        dataSet - IPTC dataset.
        Throws:
        ArgumentNullException - DataSet could not be null.
      • removeIptc

        public final void removeIptc()

        Removes IPTC metadata from image.

        Specified by:
        removeIptc in interface IIptc
      • getBarCodeTypes

        public final String[] getBarCodeTypes()

        Gets bar-codes presented in the image.

        Specified by:
        getBarCodeTypes in interface IBarCodeDetector
        Returns:
        Array of barcode types.
        Throws:
        GroupDocsException - Could not detect barcodes in evaluation mode or Could not detect barcodes types.
      • removePhotoshopData

        public final void removePhotoshopData()

        Removes Photoshop image resource blocks.

        Throws:
        GroupDocsException - Could not remove PSD metadata.


        This feature is not available in trial mode.

      • cleanMetadata

        public void cleanMetadata()

        Removes all metadata presented in Jpeg: EXIF, XMP, IPTC and Photoshop image resource blocks.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class ImageFormat