1. 首页
  2. 考试认证
  3. 其它
  4. haxe openfl webp支持WebP图像编解码的OpenFL扩展

haxe openfl webp支持WebP图像编解码的OpenFL扩展

上传者: 2024-10-29 17:01:51上传 ZIP文件 2.88MB 热度 2次

网站:提供有关WebP的更多资料。设置/安装:首先需要HaxeOpenFL,使用以下命令安装:haxelib install openfl-webp

用法/API

WebP API 非常简单,主要涉及ByteArrayBitmapData对象的编码/解码。

  • 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对象

下载地址
用户评论