public final class PsdFormat extends ImageFormat implements IXmp, IIptc, IImageResourceBlocks
Represents Adobe Photoshop format.
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()
Deprecated.
|
IptcDataSetCollection |
getIptcValues()
Gets the IPTC metadata package attached to the file.
|
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()
Deprecated.
|
boolean |
hasXmp()
Gets true if
PsdFormat contains XMP data. |
void |
removeIptc()
Deprecated.
|
void |
removeXmpData()
Removes all XMP data.
|
void |
setIptcValues(IptcDataSetCollection value)
Sets the IPTC metadata package attached to the file.
|
boolean |
setXmpData(XmpPacketWrapper package_)
Updates XMP packet.
|
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 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 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 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.@Deprecated public final IptcCollection getIptc()
Gets the IPTC collection.
@Deprecated public final void updateIptc(IptcCollection collection)
Updates IPTC metadata.
updateIptc
in interface IIptc
collection
- An IPTC collection.ArgumentNullException
- The collection could not be null.@Deprecated 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.@Deprecated 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 © 2019. All rights reserved.