# Interface: IImage
引擎原生图片接口。
# Table of contents
# Properties
# Properties
# autoRelease
• Optional autoRelease: boolean
对于ArrayBuffer创建的图片,第一次使用后是否要自动释放内存,在xr-frame中,默认自动释放。
# data
• Optional Readonly data: ArrayBuffer | HTMLImageElement
解码数据,视不同Backend而定。
# height
• height: number
图片高度。
# localPath
• Optional localPath: string
图片本地缓存地址,仅在微信内有用。
# onerror
• onerror: (error: Error) => void
# Type declaration
▸ (error): void
出错的回调。
# Parameters
| Name | Type |
|---|---|
error | Error |
# Returns
void
# onload
• onload: () => void
# Type declaration
▸ (): void
加载完成的回调。
# Returns
void
# premultiplyAlpha
• premultiplyAlpha: boolean
是否要预乘Alpha。
# src
• src: string | ArrayBufferView | ArrayBuffer
图片地址或者待解码的ArrayBuffer。
# type
• Optional type: string
图片源于ArrayBuffer时,传入的mimetype。
# width
• width: number
图片宽度。