Fast or asynchronous AS3 JPEG encoding

后端 未结 5 1763
野趣味
野趣味 2020-12-18 05:42

I\'m currently using the JPGEncoder from the AS3 core lib to encode a bitmap to JPEG

 var enc:JPGEncoder = new JPGEncoder(90);
 var jpg:ByteArra         


        
5条回答
  •  我在风中等你
    2020-12-18 06:30

    asynchronous decode the png picture in separate thread ,supported by new version ...

    var loaderContext:LoaderContext = new LoaderContext();
    loaderContext.imageDecodingPolicy = ImageDecodingPolicy.ON_LOAD;
    
    var loader:Loader = new Loader();
    loader.load(new URLRequest("...png"),loaderContext);
    addChild(loader);
    

    that's official.

提交回复
热议问题