actionscript 3 - AS3 - Compress ByteArray -


out of drawing i'm generating png , upload base64 string via php server. possible compress base64 string in as3?

this code:

var png:bytearray = pngencoder.encode(b); var myimage:string = base64.encodebytearray(png); 

i hoping speed things little. informations.

your png data already compressed. attempt manually compress base64 data, end binary data again, , result cannot smaller original image data was. if server can accept binary data, save space skipping base64 encoding , shipping raw image data.

alternately, try encoding image jpeg instead of png, let further reduce size of data, albeit @ expense of image quality.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -