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
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
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
|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
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;
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
6 matches
Mail list logo