Which package do I need to import to use JPGEncode

2019-02-27 15:28发布

var jpgEncoder:JPGEncoder = new JPGEncoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(bmpData);

The above is reporting error:

Type was not found or was not a compile-time constant: JPGEncoder.
Call to a possibly undefined method JPGEncoder.

标签: flash package
1条回答
Root(大扎)
2楼-- · 2019-02-27 16:09

Are you talking about

com.adobe.images.JPGEncoder; ?

If so,This is from the core classes in ActionScript 3 Core Library.

Edit : The only other I know of that may come prepackaged is

mx.graphics.codec.JPEGEncoder

Not sure how it matches up to the as3core library

查看更多
登录 后发表回答