ImageData
概述
ImageData 是 Aspose.Psd FOSS 中用于 Python 的类。
将 PSD 图像数据段存储为压缩头加原始负载字节。
此类为 Python 程序中的 ImageData 对象声明了 4 个方法。可用的方法包括:__init__、load、save、to_public_info。在安装了 Aspose.Psd FOSS for Python 包之后,公共成员对任何 Python 应用程序均可访问。属性:compression、raw_data、structure。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
structure | ImageDataStructure | 读取 | 获取负载的已解析结构解释。 |
compression | CompressionMethod | 读取 | 获取存储的压缩方法。 |
raw_data | bytearray | 读取 | 获取压缩字段之后的原始图像数据负载。 |
方法
| 签名 | 描述 |
|---|---|
__init__(compression: CompressionMethod, raw_data: bytearray, structure: ImageDataStructure) | 初始化 ImageData 类的新实例。 |
load(reader: BigEndianReader, is_large_document: bool, height: int, channel_count: int) → "ImageData" | 从读取器加载最终的 Image Data 部分。 |
save(writer: BigEndianWriter) | 将 Image Data 部分写入 writer。 |
to_public_info() → PsdImageDataInfo | 创建已解析的合并 image data 结构的只读公共摘要。 |