[Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Anthony Pace
I can do it by reducing the size of the container object; yet, the bitmap remains the same file sized and can be scaled well. Is there a way to guarantee the memory usage drops? or at least a better way then mine? ___ Flashcoders mailing list

Re: [Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Glen Pike
Hi, The only way to reduce the memory size of a bitmap is to resize it and reduce the number of pixels. If you are loading images from the server, you might want to think about generating smaller images server side - you may only have to do this once when the image is uploaded, so

Re: [Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Anthony Pace
Examples? Glen Pike wrote: Hi, The only way to reduce the memory size of a bitmap is to resize it and reduce the number of pixels. If you are loading images from the server, you might want to think about generating smaller images server side - you may only have to do this once

Re: [Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Glen Pike
|Hi, Something like this: import flash.display.Bitmap; import flash.display.BitmapData; //original image in here container.width /= 10; ||container.height /= 10;| //maybe invalidate if it does not redraw?? | var a:BitmapData = new BitmapData(container.width, container.height); var

Re: [Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Anthony Pace
Now when I scale the image it won't display... OMG. this is nuts. I thought I had it all figured out, and then wham... it won't work. Glen Pike wrote: |Hi, Something like this: import flash.display.Bitmap; import flash.display.BitmapData; //original image in here container.width /= 10;

Re: [Flashcoders] What is the best way to scale a bitmap specifically to reduce file size...

2008-11-25 Thread Latcho
file size is something else then memory size. If you want a smaller swf size, you have to make the source image smaller within the fla or before embedding it via code. So be more specific. But I think you are after this: import flash.geom.*; import flash.display.BitmapData; import