haxe openfl webp支持WebP图像编解码的OpenFL扩展
网站:提供有关WebP的更多资料。设置/安装:首先需要Haxe和OpenFL,使用以下命令安装:haxelib install openfl-webp
。
用法/API:
WebP API 非常简单,主要涉及ByteArray和BitmapData对象的编码/解码。
-
webp.Webp.getDecoderVersion() : 获取解码器版本,返回类型为
String
-
webp.Webp.getEncoderVersion() : 获取编码器版本,返回类型为
String
-
webp.Webp.getImageInfo(bytes : ByteArray) : 提取图像信息,返回
WebpInfo
-
webp.Webp.decodeAsBitmapData(bytes : ByteArray) : 将数据解码为
BitmapData
-
webp.Webp.encodeBitmapData(bitmapData : BitmapData) : 编码
BitmapData
对象
下载地址
用户评论