---
Product: psd
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/psd/python/psdimagedocumentstate
---

# PsdImageDocumentState

## Overview

`PsdImageDocumentState` is a class in Aspose.PSD FOSS for Python.

Stores parsed PSD/PSB document sections used by PsdImage.

This class declares 3 methods for PsdImageDocumentState objects in Python programs.
Available methods include: `__init__`, `empty`, `with_layer_and_mask_section`.
Public members are accessible to any Python application after installing the Aspose.PSD FOSS for Python package.
Properties: `ColorData`, `Empty`, `Header`, `ImageData`, `ImageResourcesSection`, `color_data`, and 4 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Header` | `PsdHeader \| None` | Read | Gets the header. |
| `ColorData` | `ColorData` | Read | Gets the color data. |
| `ImageResourcesSection` | `ImageResourcesSection` | Read | Gets the image resources section. |
| `layer_and_mask_section` | `LayerAndMaskSection` | Read | Gets the layer and mask section. |
| `ImageData` | `ImageData` | Read | Gets the image data. |
| `Empty` | `"PsdImageDocumentState"` | Read | Gets the empty. |
| `header` | - | Read | Gets the header. |
| `color_data` | - | Read | Gets the color data. |
| `image_resources_section` | - | Read | Gets the image resources section. |
| `image_data` | - | Read | Gets the image data. |

## Methods

| Signature | Description |
|-----------|-------------|
| `empty()` → `"PsdImageDocumentState"` | Gets an empty document state before a PSD/PSB stream has been parsed. |
| `__init__(header: PsdHeader \| None, color_data: ColorData, image_resources_section: ImageResourcesSection, layer_and_mask_section: LayerAndMaskSection, image_data: ImageData)` | Calls __init__(header, color_data, image_resources_section, layer_and_mask_section, image_data) on this PsdImageDocumentState instance. |
| `with_layer_and_mask_section(layer_and_mask_section: LayerAndMaskSection)` → `"PsdImageDocumentState"` | Creates a state copy with a replaced Layer and Mask Information section. |

## See Also

- [Aspose.PSD for Python — Enterprise API Reference](https://reference.aspose.com/psd/python-net/)