actionscript 3 - AS3 Image editing library -


is there image editing library action script? want perform few basic tasks resizing image, cropping image, adding text etc.
trying resize multiple images @ 1 time. tried doing following code:

private function resizetorightsideadsize():void             {                 var originalimage:uploadedimage = listofselectedimages.getitemat(0) uploadedimage;                  var scalewidth:number = rightsideadwidth/originalimage.originalwidth;                 var scaleheight:number = rightsideadheight/originalimage.originalheight;                 var resizeddata:bitmapdata = scalebitmap(originalimage.imagebitmap.bitmapdata, scalewidth, scaleheight);                 var encoder:jpegencoder = new jpegencoder();                 var bytearray:bytearray = encoder.encode(resizeddata);                 //var bytearray:bytearray = imageencoder.getjpgbytearraydata(image);                 filereference.save(bytearray,"1.jpeg");             }  public function scalebitmap(src: bitmapdata, ratiowidth: number, ratioheight: number): bitmapdata             {                 var bmd: bitmapdata = new bitmapdata(src.width * ratiowidth, src.height * ratioheight);                 var m: matrix = new matrix();                    m.scale(ratiowidth, ratioheight);                 bmd.draw(src, m);                 return bmd;             } 

but not resize properly. center of resized image gets stretched.
wondering if there open source library available can achieved faster.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -