Hi, Perico,
Would not it be easiler just open the image in your
graphic editor and resize it to approximate what
you need? I think for Toolbar button, it usually is
32 by 32 pixels in size.
Good luck,
Mingjian Song
> -----Original Message-----
> From: Perico [SMTP:[EMAIL PROTECTED]]
> Sent: Sunday, March 03, 2002 7:21 AM
> To: [EMAIL PROTECTED]
> Subject: How to make a little image from another larger.
>
> I have to show an image in reduced size in the toolbar of a Java
> application.
>
> The problem is that the scalation method makes the resolution in the
> image very poor. I've tried to use all the scalations methods existing
> in the Image class, but they all produce similar results.
>
> Here is an example about what I want to do:
>
> JToggleButton buttonWithReducedImage =
> new JToggleButton(new ImageIcon(
> largeImage.getScaledInstance(
> WIDTH, HEIGHT, Image.SCALE_SMOOTH)));
>
> Please, if you have some idea about how to solve this problem, tell me.
>
> Thanks a lot.
>
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing