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
| Name | Type | Access | Description |
|---|---|---|---|
width | int | Read | Gets the width of the image in pixels. |
height | int | Read | Gets the height of the image in pixels. |
channels | int | Read | Gets the number of channels in the image (e.g., 3 for RGB). |
bit_depth | int | Read | Gets the bit depth per channel (e.g., 8, 16, 32). |
color_mode | int | Read | Gets the color mode of the image. |
version | int | Read | Gets the raw PSD container version: 1 for PSD and 2 for PSB. |
format_version | int | Read | Gets the strongly typed PSD container version. |
is_large_document | bool | Read | Gets a value indicating whether the document uses the PSB large-document container. |
Methods
| Signature | Description |
|---|---|
__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. |