ImageElement
图片元素类,用于处理图片的加载、读取和写入操作。
构造函数
ImageElement
图片元素类,用于处理图片的加载、读取和写入操作。
new ImageElement(config)
参数
- config:
any配置对象,用于初始化图片元素。
返回:ImageElement ImageElement对象
属性
animationOptions
animationOptions: any
类型: any
content
content: any
类型: any
image
image: any
类型: any
type
type: any
类型: any
访问器
contentHeight
获取图像内容的高度。
get contentHeight(): any
返回: any 获取图像内容的高度。
contentWidth
获取图像内容的宽度。
get contentWidth(): any
返回: any 获取图像内容的宽度。
方法
load
加载图像元素,处理不同类型的图像源并设置内容。
load(): Promise
返回:Promise
readImage
读取图像数据并处理。
readImage(imageConfig, imageData, options): any
参数
- imageConfig:
any图像配置对象。 - imageData:
any包含图像数据的对象,需包含url属性。 - options:
any图像处理选项。
返回:any
writeImage
将图像源写入到输出对象中,处理图像资源的保存和引用。
writeImage(imageSource, outputObject, outputKey, imageOptions): void
参数
- imageSource:
any图像源,可以是字符串或其他类型。 - outputObject:
any要写入图像的输出对象。 - outputKey:
any输出对象中要存储图像的键名。 - imageOptions:
any图像处理选项,包含portalItem和resources等配置。
返回:void

BIMFlux AI
