PsdPackage
Leave feedback
On this page
Gets the metadata package containing information about the PSD file.
public PsdPackage PsdPackage { get; }
The metadata package containing information about the PSD file.
Learn more
This code sample demonstrates how to read the header of a PSD file and extract some information about the PSD layers.
using (Metadata metadata = new Metadata(Constants.PsdWithIptc))
{
var root = metadata.GetRootPackage<PsdRootPackage>();
Console.WriteLine(root.PsdPackage.ChannelCount);
Console.WriteLine(root.PsdPackage.ColorMode);
Console.WriteLine(root.PsdPackage.Compression);
Console.WriteLine(root.PsdPackage.PhotoshopVersion);
foreach (var layer in root.PsdPackage.Layers)
{
Console.WriteLine(layer.Name);
Console.WriteLine(layer.BitsPerPixel);
Console.WriteLine(layer.ChannelCount);
Console.WriteLine(layer.Flags);
Console.WriteLine(layer.Height);
Console.WriteLine(layer.Width);
// ...
}
// ...
}
- class PsdPackage
- class PsdRootPackage
- namespace GroupDocs.Metadata.Formats.Image
- assembly GroupDocs.Metadata
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.