[flexcoders] Creating Thumbnails from large images on the fly. Possible?

2007-02-22 Thread joebob409
I am wondering if it is possible with AS3 to create thumbs from large
image files on the fly.  Maybe only downloading partial image data and
shrinking the size.  Anyone know if that is possible or any
alternative methods I could possibly use for this? 

Thanks



[flexcoders] Re: Creating Thumbnails from large images on the fly. Possible?

2007-02-22 Thread joebob409
Right, but you are still having to download the entire image file and
just sizing it right?  What I was wondering if it is possible to only
donwload part of the image file like a segment, or a very low quality
to save the user bandwidth.  Is that possible with AS3 on the fly, or
would I have to use something like imagemagik for that?

--- In flexcoders@yahoogroups.com, Brian Dunphy [EMAIL PROTECTED] wrote:

 Definitely possible -- I do it using a function like so:
 
 public function getBitmapData(target:UIComponent, scale:Number =
 0.):BitmapData
 {
   var bd:BitmapData = new BitmapData(target.width * scale,
 target.height * scale);
   var m:Matrix = new Matrix();
   m.scale(scale, scale);
   bd.draw(target, m);
   return bd;
 }
 
 Basically what that function does, it accepts a target UIComponent to
 draw the thumbnail from (in my case it's usually charts, but to do
 what you're after you might use an Image or an SWFLoader). It also
 accepts a scale to upsize/downsize the bitmap to... by default it does
 it 1/3 of the size.
 
 Cheers,
 
 Brian
 
 
 On 2/22/07, joebob409 [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  I am wondering if it is possible with AS3 to create thumbs from large
   image files on the fly. Maybe only downloading partial image data and
   shrinking the size. Anyone know if that is possible or any
   alternative methods I could possibly use for this?
 
   Thanks
 
   
 
 
 -- 
 Brian Dunphy