PsdRootPackage

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

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()); // … } // … }

Methods

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.

getXmpPackage()

public final XmpPacketWrapper getXmpPackage()

Gets the XMP metadata package.

Returns: XmpPacketWrapper - The XMP metadata package.

Learn more

setXmpPackage(XmpPacketWrapper value)

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 |

getExifPackage()

public final ExifPackage getExifPackage()

Gets the EXIF metadata package.

Returns: ExifPackage - The EXIF metadata package.

Learn more

setExifPackage(ExifPackage value)

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 |

getIptcPackage()

public final IptcRecordSet getIptcPackage()

Gets the IPTC metadata package.

Returns: IptcRecordSet - The IPTC metadata package.

Learn more

setIptcPackage(IptcRecordSet value)

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 |

getImageResourcePackage()

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.

getPsdPackage()

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.