[wplug] OT: creating uniform size icons?

James O'Kane jo2y at midnightlinux.com
Thu Jun 22 02:12:35 EDT 2006


On Thu, 22 Jun 2006, Zach wrote:

> On 6/22/06, James O'Kane <jo2y at midnightlinux.com> wrote:
>> [jo2y at jadzia ~]$ convert -resize 32x32 windows.jpg windows32x32.jpg
>
> Thanks. BTW is convert part of imagemagick or gimp? I had used the
> image tag method to make some icons for my website (part of a vertical
> menu bar) and some looked nice but others looked horrible when scaled
> down. Any techniques to deal with this problem?

It's part of imagemagick.

Did the aspect ratio of the non-scaled images match what you were trying 
to scale them to? If you look at the fedora image on your example site. It 
doesn't look right. That's because the original image is 110x40 and 
they're squishing it to 32x32. It's being squished different amounts in 
the two directions. The windows image is 167x149. While this isn't square, 
the ratio 167/149 = 1.12 is closer to 32/32 than 110/40 = 2.75.

For the fedora one to look right, while not being larger than 32x32 on a 
side, it would need to find the ratio of the larger side to the new size,
110/32 = 3.4375, and scale the other side by that ratio, 40 * 3.4375 = 
11.6363. To verify, 32/11.6363 = 110/40 = 2.75. (With some rounding to all 
of these numbers.)

Now you have a slightly different problem in that the image isn't the 
32x32 you wanted. To fix that, you add a background or transparent color 
to fill space.

If that doesn't help, you'll have to speak with someone more graphically 
oriented.

-james



More information about the wplug mailing list