I have a question about reducing the size of an image.
What i want is to load an image.. resize it and then save it
into a blob(sqlite air db)
In php you say imagecopyresampled and you can save a smaller
How to do this in flex?
What i have is an function witch resizes the given image, but
i doubt the image is really reduced in size..(from 900 to 100k)
public class imageresize extends Bitmap
private var bmp:Bitmap;
private var true_width:Number;
private var true_height:Number;
private var maxx:Number;
private var maxy:Number;
private var resize:Boolean;
this.true_width = bmp.width;
this.true_height = bmp.height;
//this.true_width2 = imagesx($image);
//this.true_height2 = imagesy($image);
if (true_width>maxx) resize=true;
if (true_height>maxy) resize=true;
var height:Number = (width / true_width) * true_height;
// this is used extra in php to get a smaller image
//$dest_img = imagecreatetruecolor($width, $height);
// $dest_img, $image,
// 0, 0, 0, 0,
// $width, $height, $true_width2, $true_height2); // resize
please some help here,sorry for the way i put the code here..
i couldn't find the attach code button..
or did i have to use [attach code]? maybe handy to change the
string attach code into a link..
with some answers on another topic i created a full working
image resize for flex 3(air)
perhaps the solution i have made could be simplified, but it
works.. and thats what it's all about isn't it?