public final class PsdFormat extends ImageFormat implements IXmp, IIptc, IImageResourceBlocks
Represents Adobe Photoshop format.
filePath, stream
Constructor and Description |
---|
PsdFormat(InputStream input)
Initializes a new instance of the
PsdFormat class. |
PsdFormat(String fileName)
Initializes a new instance of the
PsdFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes (reset) metadata.
|
DublinCoreMetadata |
getDublinCore()
Gets Dublin Core metadata.
|
ExifInfo |
getExifInfo()
Returns EXIF data.
|
ImageResourceMetadata |
getImageResourceBlocks()
Gets the image resource blocks.
|
IptcCollection |
getIptc()
Gets the IPTC collection.
|
PsdLayer[] |
getLayers()
Gets the layers.
|
PsdMetadata |
getPsdInfo()
Gets the PSD information.
|
int |
getType()
Gets document type.
|
XmpPacketWrapper |
getXmpData()
Returns the XMP packet.
|
XmpProperties |
getXmpProperties()
Returns all XMP properties presented in specific format.
|
XmpEditableCollection |
getXmpValues()
Gets
XmpEditableCollection . |
boolean |
hasImageResourceBlocks()
Gets
true if file contains Photoshop Image Resource Blocks. |
boolean |
hasIptc()
Gets a value indicating whether the PSD file contains IPTC IIM metadata.
|
boolean |
hasXmp()
Gets true if
PsdFormat contains XMP data. |
void |
removeIptc()
Removes IPTC metadata from the image.
|
void |
removeXmpData()
Removes all XMP data.
|
boolean |
setXmpData(XmpPacketWrapper package_)
Updates XMP packet.
|
void |
updateIptc(IptcCollection collection)
Updates IPTC metadata.
|
void |
updateIptc(IptcDataSet dataSet)
Updates a specific IPTC dataset.
|
fromFile, fromFile, fromStream, getByteOrder, getHeight, getWidth
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public PsdFormat(String fileName)
Initializes a new instance of the PsdFormat
class.
fileName
- Absolute path to the file.public PsdFormat(InputStream input)
Initializes a new instance of the PsdFormat
class.
input
- File stream.public int getType()
Gets document type.
getType
in class FormatBase
public final boolean hasXmp()
Gets true if PsdFormat
contains XMP data.
public final PsdLayer[] getLayers()
Gets the layers.
public final XmpEditableCollection getXmpValues()
Gets XmpEditableCollection
. Provides access for all XMP properties in edit mode.
getXmpValues
in interface IXmp
public final boolean hasIptc()
Gets a value indicating whether the PSD file contains IPTC IIM metadata.
public final boolean hasImageResourceBlocks()
Gets true
if 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.
ExifInfo
if image contains EXIF data; otherwise null.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 specific format.
getXmpProperties
in interface IXmp
XmpProperties
if XMP data is presented; otherwise null.public final boolean setXmpData(XmpPacketWrapper package_)
Updates XMP packet.
setXmpData
in interface IXmp
package
- XMP packet wrapper.true
if the XMP is successfully updated; otherwise false
.ArgumentNullException
- XMP packet 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.
public void cleanMetadata()
Removes (reset) metadata. In some cases(DOC, XLS, PPT, PDF) metadata could not be deleted, just be dropped to default value.
cleanMetadata
in class ImageFormat
public final PsdMetadata getPsdInfo()
Gets the PSD information.
PsdMetadata
.InvalidFormatException
- Could not read PSD file.public final IptcCollection getIptc()
Gets the IPTC collection.
public final void updateIptc(IptcCollection collection)
Updates IPTC metadata.
updateIptc
in interface IIptc
collection
- An IPTC collection.ArgumentNullException
- The collection could not be null.public final void updateIptc(IptcDataSet dataSet)
Updates a specific IPTC dataset.
updateIptc
in interface IIptc
dataSet
- An IPTC dataset.ArgumentNullException
- The DataSet could not be null.public final void removeIptc()
Removes IPTC metadata from the image.
removeIptc
in interface IIptc
public final ImageResourceMetadata getImageResourceBlocks()
Gets the image resource blocks.
getImageResourceBlocks
in interface IImageResourceBlocks
ImageResourceMetadata
.Copyright © 2018. All rights reserved.