RE: [Flashcoders] Resizing Images

2008-07-24 Thread Lehr, Theodore M (N-SGIS)
I get an error on: var b:Bitmap;

It allows for BitmapData?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt S.
Sent: Tuesday, July 22, 2008 12:59 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Resizing Images

smoothing. Cast the image as a Bitmap and apply smoothing, and you'll
be able to resize without image degradation.

function loadTheImage(iMG):void {
url = uploads/+iMG+.jpg;
var request:URLRequest = new URLRequest(url);
var loader:Loader = new Loader();
loader.load(request);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onThumbLoad);

loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
preLoader);

}

function onThumbLoad(e:Event):void {
//cast the loaded content as Bitmap
var b:Bitmap;
b = e.target.content as Bitmap;
b.smoothing = true;

this.img_mc.addChild(b);
}

.m


On Tue, Jul 22, 2008 at 12:40 PM, Lehr, Theodore M (N-SGIS)
[EMAIL PROTECTED] wrote:
 I have a small movie where I am importing images and dynamically
 resizing them - the problem is that when it is shrunken - it gets
really
 pixellated - I am using jpegs - is there a way to make it so they look
 better - maybe import a different type of image ?

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Resizing Images

2008-07-24 Thread Matt S.
On Thu, Jul 24, 2008 at 12:50 PM, Lehr, Theodore M (N-SGIS)
[EMAIL PROTECTED] wrote:
 I get an error on: var b:Bitmap;

 It allows for BitmapData?


What error did you get?

.m
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Resizing Images

2008-07-24 Thread Lehr, Theodore M (N-SGIS)
The class or interface 'Bitmap' could not be loaded

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt S.
Sent: Thursday, July 24, 2008 1:09 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Resizing Images

On Thu, Jul 24, 2008 at 12:50 PM, Lehr, Theodore M (N-SGIS)
[EMAIL PROTECTED] wrote:
 I get an error on: var b:Bitmap;

 It allows for BitmapData?


What error did you get?

.m
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Resizing Images

2008-07-24 Thread Helmut Granda
you need the bitmap class:
import flash.display.Bitmap;

On Thu, Jul 24, 2008 at 1:01 PM, Lehr, Theodore M (N-SGIS) 
[EMAIL PROTECTED] wrote:

 The class or interface 'Bitmap' could not be loaded

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Matt S.
 Sent: Thursday, July 24, 2008 1:09 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Resizing Images

 On Thu, Jul 24, 2008 at 12:50 PM, Lehr, Theodore M (N-SGIS)
 [EMAIL PROTECTED] wrote:
  I get an error on: var b:Bitmap;
 
  It allows for BitmapData?
 

 What error did you get?

 .m
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Resizing Images

2008-07-24 Thread Lehr, Theodore M (N-SGIS)
What if I max out at 2.0 - how would I smooth the images?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Thursday, July 24, 2008 2:28 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Resizing Images

you need the bitmap class:
import flash.display.Bitmap;

On Thu, Jul 24, 2008 at 1:01 PM, Lehr, Theodore M (N-SGIS) 
[EMAIL PROTECTED] wrote:

 The class or interface 'Bitmap' could not be loaded

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Matt
S.
 Sent: Thursday, July 24, 2008 1:09 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Resizing Images

 On Thu, Jul 24, 2008 at 12:50 PM, Lehr, Theodore M (N-SGIS)
 [EMAIL PROTECTED] wrote:
  I get an error on: var b:Bitmap;
 
  It allows for BitmapData?
 

 What error did you get?

 .m
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Resizing Images

2008-07-22 Thread Lehr, Theodore M (N-SGIS)
I have a small movie where I am importing images and dynamically
resizing them - the problem is that when it is shrunken - it gets really
pixellated - I am using jpegs - is there a way to make it so they look
better - maybe import a different type of image ?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Resizing Images

2008-07-22 Thread Ian Thomas
Hi Theodore,

   (I'm assuming this is AS2...)

   Are these images in the library?

   If so, go to Properties and make sure Smoothing is ticked.

   If you're loading external images, there is a bug in AS2 which
stops smoothing from working properly.

There's a workaround for it detailed here:
http://code.awenmedia.com/node/27

That should get rid of the pixellation.

Hope that helps,
   Ian

On Tue, Jul 22, 2008 at 5:40 PM, Lehr, Theodore M (N-SGIS)
[EMAIL PROTECTED] wrote:
 I have a small movie where I am importing images and dynamically
 resizing them - the problem is that when it is shrunken - it gets really
 pixellated - I am using jpegs - is there a way to make it so they look
 better - maybe import a different type of image ?

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Resizing Images

2008-07-22 Thread Matt S.
smoothing. Cast the image as a Bitmap and apply smoothing, and you'll
be able to resize without image degradation.

function loadTheImage(iMG):void {
url = uploads/+iMG+.jpg;
var request:URLRequest = new URLRequest(url);
var loader:Loader = new Loader();
loader.load(request);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onThumbLoad);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, 
preLoader);

}

function onThumbLoad(e:Event):void {
//cast the loaded content as Bitmap
var b:Bitmap;
b = e.target.content as Bitmap;
b.smoothing = true;

this.img_mc.addChild(b);
}

.m


On Tue, Jul 22, 2008 at 12:40 PM, Lehr, Theodore M (N-SGIS)
[EMAIL PROTECTED] wrote:
 I have a small movie where I am importing images and dynamically
 resizing them - the problem is that when it is shrunken - it gets really
 pixellated - I am using jpegs - is there a way to make it so they look
 better - maybe import a different type of image ?

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Resizing Images

2008-07-22 Thread eric e. dolecki
Do you even need to cast as Bitmap? can't you just do
container.forceSmoothing = true; ? Oops - that might be AS2.

On Tue, Jul 22, 2008 at 12:59 PM, Matt S. [EMAIL PROTECTED] wrote:

 smoothing. Cast the image as a Bitmap and apply smoothing, and you'll
 be able to resize without image degradation.

 function loadTheImage(iMG):void {
url = uploads/+iMG+.jpg;
var request:URLRequest = new URLRequest(url);
var loader:Loader = new Loader();
loader.load(request);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
 onThumbLoad);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
 preLoader);

 }

 function onThumbLoad(e:Event):void {
//cast the loaded content as Bitmap
var b:Bitmap;
b = e.target.content as Bitmap;
b.smoothing = true;

this.img_mc.addChild(b);
 }

 .m


 On Tue, Jul 22, 2008 at 12:40 PM, Lehr, Theodore M (N-SGIS)
 [EMAIL PROTECTED] wrote:
  I have a small movie where I am importing images and dynamically
  resizing them - the problem is that when it is shrunken - it gets really
  pixellated - I am using jpegs - is there a way to make it so they look
  better - maybe import a different type of image ?
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders