PsdHeader

Overview

PsdHeader is a class in Aspose.Psd FOSS for Python.

Contains the header information of a Photoshop document.

This class declares 5 methods for PsdHeader objects in Python programs. Available methods include: __init__, load, save, set_color_mode, set_version. Public members are accessible to any Python application after installing the Aspose.Psd FOSS for Python package. Properties: bit_depth, channels, color_mode, format_version, height, is_large_document, and 2 more.

Properties

NameTypeAccessDescription
widthintReadGets the width of the image in pixels.
heightintReadGets the height of the image in pixels.
channelsintReadGets the number of channels in the image (e.g., 3 for RGB).
bit_depthintReadGets the bit depth per channel (e.g., 8, 16, 32).
color_modeintReadGets the color mode of the image.
versionintReadGets the raw PSD container version: 1 for PSD and 2 for PSB.
format_versionintReadGets the strongly typed PSD container version.
is_large_documentboolReadGets a value indicating whether the document uses the PSB large-document container.

Methods

SignatureDescription
__init__()Calls init on this PsdHeader instance.
load(reader) → "PsdHeader"Loads the fixed PSD/PSB file header from the reader.
save(writer)Writes the fixed PSD/PSB file header to the writer.
set_color_mode(color_mode: int)Updates the header color mode for the compatibility subset that rewrites header metadata.
set_version(version: int)Updates the PSD container version.

See Also