PsdSectionReader

PsdSectionReader

Overview

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

Provides bounded reads for PSD/PSB sections that are stored in memory by this implementation.

This class declares 5 methods for PsdSectionReader objects in Python programs. Available methods include: ReadBytes, get_memory_backed_length, get_nested_memory_backed_length, read_bytes, validate_signed_length. Public members are accessible to any Python application after installing the Aspose.Psd FOSS for Python package.

Methods

SignatureDescription
read_bytes(reader: BigEndianReader, length: int, section_name: str) → bytesReads a declared section payload after validating stream boundaries and the in-memory size limit.
ReadBytes(reader: BigEndianReader, length: int, section_name: str) → bytesCalls ReadBytes(reader, length, section_name) on this PsdSectionReader instance.
get_memory_backed_length(reader: BigEndianReader, length: int, section_name: str) → intValidates a declared section length and returns the equivalent in-memory array size.
validate_signed_length(length: int, section_name: str) → intValidates a signed length field that belongs to a bounded section.
get_nested_memory_backed_length(reader: BigEndianReader, length: int, section_end: int, section_name: str) → intValidates that a nested payload stays inside the already-bounded enclosing section.

See Also