PsdRootPackage
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.RootMetadataPackage, com.groupdocs.metadata.core.ImageRootPackage
All Implemented Interfaces: com.groupdocs.metadata.core.IXmp, com.groupdocs.metadata.core.IIptc, com.groupdocs.metadata.core.IExif
public class PsdRootPackage extends ImageRootPackage implements IXmp, IIptc, IExif
Represents the root package allowing working with metadata in a Photoshop Document.
Learn more
- Working with metadata in PSD images
- Working with EXIF metadata
- Working with XMP metadata
- Working with IPTC IIM metadata
This code sample demonstrates how to read the header of a PSD file and extract some information about the PSD layers.
try (Metadata metadata = new Metadata(Constants.PsdWithIptc)) { PsdRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getPsdPackage().getChannelCount()); System.out.println(root.getPsdPackage().getColorMode()); System.out.println(root.getPsdPackage().getCompression()); System.out.println(root.getPsdPackage().getPhotoshopVersion()); for (PsdLayer layer : root.getPsdPackage().getLayers()) { System.out.println(layer.getName()); System.out.println(layer.getBitsPerPixel()); System.out.println(layer.getChannelCount()); System.out.println(layer.getFlags()); System.out.println(layer.getHeight()); System.out.println(layer.getWidth()); // … } // … }
| Method | Description |
|---|---|
| getXmpPackage() | Gets the XMP metadata package. |
| setXmpPackage(XmpPacketWrapper value) | Sets the XMP metadata package. |
| getExifPackage() | Gets the EXIF metadata package. |
| setExifPackage(ExifPackage value) | Sets the EXIF metadata package. |
| getIptcPackage() | Gets the IPTC metadata package. |
| setIptcPackage(IptcRecordSet value) | Sets the IPTC metadata package. |
| getImageResourcePackage() | Gets the Photoshop Image Resource metadata package. |
| getPsdPackage() | Gets the metadata package containing information about the PSD file. |
| copyTo(MetadataPackage metadata) |
public final XmpPacketWrapper getXmpPackage()
Gets the XMP metadata package.
Returns: XmpPacketWrapper - The XMP metadata package.
Learn more
public final void setXmpPackage(XmpPacketWrapper value)
Sets the XMP metadata package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | XmpPacketWrapper | The XMP metadata package. |
Learn more
Working with XMP metadata: https://docs.groupdocs.com/display/metadatajava/Working+with+XMP+metadata |
public final ExifPackage getExifPackage()
Gets the EXIF metadata package.
Returns: ExifPackage - The EXIF metadata package.
Learn more
public final void setExifPackage(ExifPackage value)
Sets the EXIF metadata package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | ExifPackage | The EXIF metadata package. |
Learn more
Working with EXIF metadata: https://docs.groupdocs.com/display/metadatajava/Working+with+EXIF+metadata |
public final IptcRecordSet getIptcPackage()
Gets the IPTC metadata package.
Returns: IptcRecordSet - The IPTC metadata package.
Learn more
public final void setIptcPackage(IptcRecordSet value)
Sets the IPTC metadata package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | IptcRecordSet | The IPTC metadata package. |
Learn more
Working with IPTC IIM metadata: https://docs.groupdocs.com/display/metadatajava/Working+with+IPTC+IIM+metadata |
public final ImageResourcePackage getImageResourcePackage()
Gets the Photoshop Image Resource metadata package. Image resource blocks are the basic building unit of Photoshop native file format.
Returns: ImageResourcePackage - The Image Resource metadata package.
public final PsdPackage getPsdPackage()
Gets the metadata package containing information about the PSD file.
Returns: PsdPackage - The metadata package containing information about the PSD file.
public void copyTo(MetadataPackage metadata)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| metadata | MetadataPackage |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.