LayerAndMaskSection
概述
LayerAndMaskSection 是 Aspose.Psd FOSS 中用于 Python 的一个类。
表示 PSD/PSB 图层和蒙版信息部分及其
raw-preserved save state.此类为 Python 程序中的 LayerAndMaskSection 对象声明了 5 个方法。可用的方法包括:__init__、empty、load、save、with_layers。在安装了 Aspose.Psd FOSS for Python 包后,公共成员可被任何 Python 应用程序访问。属性有:has_layer_collection_mutated、layer_channel_image_data_raw、layer_count_raw、layer_global_mask_and_tail_raw、layers、raw_section_bytes。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
raw_section_bytes | bytes | 读取 | 获取不带外部长度字段的原始节负载。 |
layer_channel_image_data_raw | bytes | 读取 | 在图层记录之后获取原始图层通道图像数据负载。 |
layer_global_mask_and_tail_raw | bytes | 读取 | 获取原始全局蒙版信息和尾随节字节。 |
layer_count_raw | int | 读取 | 获取原始签名层计数,以便对透明保护层进行处理 |
can preserve sign. || layers | List[Layer] | 读取 | 获取已解析的图层记录。 | | has_layer_collection_mutated | bool | 读取 | 获取公共图层集合是否已被替换。 |
方法
| 签名 | 描述 |
|---|---|
__init__(raw_section_bytes: bytes, layer_channel_image_data_raw: bytes, layer_global_mask_and_tail_raw: bytes, layer_count_raw: int, layers: List[Layer], has_layer_collection_mutated: bool) | 初始化 :class:LayerAndMaskSection 类的新实例。 |
empty() → "LayerAndMaskSection" | 获取一个空的图层和蒙版信息部分。 |
load(reader: BigEndianReader, is_large_document: bool) → "LayerAndMaskSection" | 在此 LayerAndMaskSection 实例上调用 load(reader, is_large_document)。 |
save(writer: BigEndianWriter, is_large_document: bool) | 在此 LayerAndMaskSection 实例上调用 save(writer, is_large_document). |
with_layers(layers: List[Layer]) → "LayerAndMaskSection" | 创建一个带有替换层集合的节副本并标记它 |
for rewriting on save. |