public final class JpegFormat extends ImageFormat implements IExif, IXmp, IIptc, IBarCodeDetector, IImageResourceBlocks
Represents JPEG format.
filePath, stream
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.
|
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()
Gets the IPTC collection.
|
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 true if image has barcodes.
|
boolean |
hasImageResourceBlocks()
Gets
true if file contains Photoshop Image Resource Blocks. |
boolean |
hasIptc()
Gets true if JPEG contains IPTC IIM metadata.
|
boolean |
hasXmp()
Gets true if
JpegFormat contains XMP data. |
boolean |
removeExifInfo()
Removes EXIF metadata.
|
boolean |
removeGpsLocation()
Removes GPS coordinates of the photo.
|
void |
removeIptc()
Removes IPTC metadata from image.
|
void |
removePhotoshopData()
Removes Photoshop image resource blocks.
|
void |
removeXmpData()
Removes all XMP data.
|
boolean |
setExifInfo(JpegExifInfo exifInfo)
Writes EXIF data.
|
boolean |
setXmpData(XmpPacketWrapper package_)
Updates XMP packages.
|
boolean |
updateExifInfo(ExifInfo exifInfo)
Updates EXIF data in Jpeg format.
|
void |
updateIptc(IptcCollection collection)
Updates IPTC metadata.
|
void |
updateIptc(IptcDataSet dataSet)
Updates specific IPTC dataset.
|
fromFile, fromFile, fromStream, getByteOrder, getHeight, getWidth
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.
Value: Document type.getType
in class FormatBase
public final boolean hasXmp()
Gets true if JpegFormat
contains XMP data.
true
if JPEG has XMP; otherwise, false
.public final ExifInfo getExifValues()
Gets ExifInfo
. Provides access for all EXIF properties.
getExifValues
in interface IExif
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(JpegExifInfo exifInfo)
Writes EXIF data.
exifInfo
- The EXIF information.
true
if EXIF updated successfully; otherwise false.com.aspose.ms.System.ArgumentNullException
- EXIF data could not be null.com.aspose.ms.System.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 XmpEditableCollection getXmpValues()
Gets XmpEditableCollection
. Provides access for all XMP properties in edit mode.
getXmpValues
in interface IXmp
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.com.aspose.ms.System.ArgumentNullException
- Package could not be null.public final void removeXmpData()
Removes all XMP data.
removeXmpData
in interface IXmp
public final boolean hasIptc()
Gets true if JPEG contains IPTC IIM metadata.
Value:true
if image has IPTC IIM metadata; otherwise, false
.public final IptcCollection getIptc()
Gets the IPTC collection.
public final void updateIptc(IptcCollection collection)
Updates IPTC metadata.
updateIptc
in interface IIptc
collection
- IPTC collection.com.aspose.ms.System.ArgumentNullException
- Collection could not be null.public final void updateIptc(IptcDataSet dataSet)
Updates specific IPTC dataset.
updateIptc
in interface IIptc
dataSet
- IPTC dataset.com.aspose.ms.System.ArgumentNullException
- DataSet could not be null.public final void removeIptc()
Removes IPTC metadata from image.
removeIptc
in interface IIptc
public final boolean hasBarCodes()
Gets true if image has barcodes.
Value:true
if file has bar codes; otherwise, false
.hasBarCodes
in interface IBarCodeDetector
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 boolean hasImageResourceBlocks()
Gets true
if file contains Photoshop Image Resource Blocks.
true
if file has image resource blocks; otherwise, false
.hasImageResourceBlocks
in interface IImageResourceBlocks
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 © 2017. All rights reserved.