psd_tools.psd

Low-level API that translates binary data to Python structure.

All the data structure in this subpackage inherits from one of the object defined in psd_tools.psd.base module.

PSD

class psd_tools.psd.PSD(header=_Nothing.NOTHING, color_mode_data=_Nothing.NOTHING, image_resources=_Nothing.NOTHING, layer_and_mask_information=_Nothing.NOTHING, image_data=_Nothing.NOTHING)[source]

Low-level PSD file structure that resembles the specification.

Example:

from psd_tools.psd import PSD

with open(input_file, 'rb') as f:
    psd = PSD.read(f)

with open(output_file, 'wb') as f:
    psd.write(f)
header

See FileHeader.

color_mode_data

See ColorModeData.

image_resources

See ImageResources.

layer_and_mask_information

See LayerAndMaskInformation.

image_data

See ImageData.