public final class JpegFormat extends ImageFormat implements IExif, IXmp, IIptc, IBarCodeDetector, IImageResourceBlocks
Represents JPEG format.
Constructor and Description |
---|
JpegFormat(InputStream input)
Initializes a new instance of the
JpegFormat class. |
JpegFormat(String fileName)
Initializes a new instance of the
JpegFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes all metadata presented in Jpeg: EXIF, XMP, IPTC and Photoshop image resource blocks.
|
String[] |
getBarCodeTypes()
Gets bar-codes presented in the image.
|
DublinCoreMetadata |
getDublinCore()
Gets Dublin Core metadata.
|
ExifInfo |
getExifInfo()
Returns EXIF data.
|
ExifInfo |
getExifValues()
Gets
ExifInfo . |
GpsLocation |
getGpsLocation()
Gets GPS coordinates where a photo was taken.
|
ImageResourceMetadata |
getImageResourceBlocks()
Gets the image resource blocks.
|
IptcCollection |
getIptc()
Deprecated.
|
IptcDataSetCollection |
getIptcValues()
Gets the IPTC metadata package attached to the file.
|
MakerNotesBase |
getMakernotes()
Gets the makernotes from EXIF.
|
int |
getType()
Gets document type.
|
XmpPacketWrapper |
getXmpData()
Returns the XMP packet.
|
XmpProperties |
getXmpProperties()
Returns all XMP properties presented in
JpegFormat . |
XmpEditableCollection |
getXmpValues()
Gets
XmpEditableCollection . |
boolean |
hasBarCodes()
Gets a value indicating whether image has barcodes.
|
boolean |
hasImageResourceBlocks()
Gets a value indicating whether file contains Photoshop Image Resource Blocks.
|
boolean |
hasIptc()
Deprecated.
|
boolean |
hasXmp()
Gets a value indicating whether
JpegFormat contains XMP data. |
boolean |
removeExifInfo()
Removes EXIF metadata.
|
boolean |
removeGpsLocation()
Removes GPS coordinates of the photo.
|
void |
removeIptc()
Deprecated.
|
void |
removePhotoshopData()
Removes Photoshop image resource blocks.
|
void |
removeXmpData()
Removes all XMP data.
|
boolean |
setExifInfo(ExifInfo exifInfo)
Writes EXIF data.
|
void |
setIptcValues(IptcDataSetCollection value)
Sets the IPTC metadata package attached to the file.
|
boolean |
setXmpData(XmpPacketWrapper package_)
Updates XMP packages.
|
boolean |
updateExifInfo(ExifInfo exifInfo)
Updates EXIF data in Jpeg format.
|
void |
updateIptc(IptcCollection collection)
Deprecated.
|
void |
updateIptc(IptcDataSet dataSet)
Deprecated.
|
fromFile, fromFile, fromStream, getByteOrder, getHeight, getWidth
close, dispose, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public JpegFormat(String fileName)
Initializes a new instance of the JpegFormat
class.
fileName
- Absolute path to the file.public JpegFormat(InputStream input)
Initializes a new instance of the JpegFormat
class.
input
- File stream.public int getType()
Gets document type.
getType
in class FormatBase
public final boolean hasXmp()
Gets a value indicating whether JpegFormat
contains XMP data.
public final ExifInfo getExifValues()
Gets ExifInfo
. Provides access for all EXIF properties.
getExifValues
in interface IExif
public final XmpEditableCollection getXmpValues()
Gets XmpEditableCollection
. Provides access for all XMP properties in edit mode.
getXmpValues
in interface IXmp
public final IptcDataSetCollection getIptcValues()
Gets the IPTC metadata package attached to the file.
getIptcValues
in interface IIptc
public final void setIptcValues(IptcDataSetCollection value)
Sets the IPTC metadata package attached to the file.
setIptcValues
in interface IIptc
value
- The IPTC metadata package attached to the file.@Deprecated public final boolean hasIptc()
Gets a value indicating whether JPEG contains IPTC IIM metadata.
public final boolean hasBarCodes()
Gets a value indicating whether image has barcodes.
hasBarCodes
in interface IBarCodeDetector
true
if file has bar codes; otherwise, false
.public final boolean hasImageResourceBlocks()
Gets a value indicating whether file contains Photoshop Image Resource Blocks.
hasImageResourceBlocks
in interface IImageResourceBlocks
true
if file has image resource blocks; otherwise, false
.public final ExifInfo getExifInfo()
Returns EXIF data.
getExifInfo
in interface IExif
ExifInfo
if image contains EXIF data; otherwise null.public final boolean removeExifInfo()
Removes EXIF metadata.
removeExifInfo
in interface IExif
public final boolean removeGpsLocation()
Removes GPS coordinates of the photo.
removeGpsLocation
in interface IExif
public final GpsLocation getGpsLocation()
Gets GPS coordinates where a photo was taken.
getGpsLocation
in interface IExif
public final boolean setExifInfo(ExifInfo exifInfo)
Writes EXIF data.
exifInfo
- The EXIF information.
true
if EXIF updated successfully; otherwise false.ArgumentNullException
- EXIF data could not be null.ArgumentNullException
- EXIF data could not be null.public final boolean updateExifInfo(ExifInfo exifInfo)
Updates EXIF data in Jpeg format.
updateExifInfo
in interface IExif
exifInfo
- EXIF data.public final MakerNotesBase getMakernotes()
Gets the makernotes from EXIF.
MakerNotesBase
.GroupDocsException
- Could not read makernotes.public final XmpPacketWrapper getXmpData()
Returns the XMP packet.
getXmpData
in interface IXmp
XmpPacketWrapper
if XMP data is presented, otherwise null.public final XmpProperties getXmpProperties()
Returns all XMP properties presented in JpegFormat
.
getXmpProperties
in interface IXmp
XmpProperties
if XMP data is presented; otherwise null.public final boolean setXmpData(XmpPacketWrapper package_)
Updates XMP packages.
setXmpData
in interface IXmp
package
- XMP packet wrapper.ArgumentNullException
- Package could not be null.public final void removeXmpData()
Removes all XMP data.
removeXmpData
in interface IXmp
public final DublinCoreMetadata getDublinCore()
Gets Dublin Core metadata.
getDublinCore
in interface IDublinCore
DublinCoreMetadata
if Dublin Core metadata is presented; otherwise null.
@Deprecated public final IptcCollection getIptc()
Gets the IPTC collection.
@Deprecated public final void updateIptc(IptcCollection collection)
Updates IPTC metadata.
updateIptc
in interface IIptc
collection
- IPTC collection.ArgumentNullException
- Collection could not be null.@Deprecated public final void updateIptc(IptcDataSet dataSet)
Updates specific IPTC dataset.
updateIptc
in interface IIptc
dataSet
- IPTC dataset.ArgumentNullException
- DataSet could not be null.@Deprecated public final void removeIptc()
Removes IPTC metadata from image.
removeIptc
in interface IIptc
public final String[] getBarCodeTypes()
Gets bar-codes presented in the image.
getBarCodeTypes
in interface IBarCodeDetector
GroupDocsException
- Could not detect barcodes in evaluation mode
or
Could not detect barcodes types.public final ImageResourceMetadata getImageResourceBlocks()
Gets the image resource blocks.
getImageResourceBlocks
in interface IImageResourceBlocks
ImageResourceMetadata
.public final void removePhotoshopData()
Removes Photoshop image resource blocks.
GroupDocsException
- Could not remove PSD metadata.
public void cleanMetadata()
Removes all metadata presented in Jpeg: EXIF, XMP, IPTC and Photoshop image resource blocks.
cleanMetadata
in class ImageFormat
Copyright © 2019. All rights reserved.