[Clipart] Making our thumbnails comply with the thumbnail spec, i.e., 128x128px

Nicu Buculei nicu at nicubunu.ro
Sun May 1 09:33:44 PDT 2005

Jon Phillips wrote:
> I am or the fd.o spec. I think PNG and 128x128 is great to use on the
> site and for the packages. I think we should unify and get support for
> this up to spec. I can adjust the site to suit.
> For the image, then we can shrink the longest side to 128 px, center it,
> put white background or leave none (alpha transparent, or what does the
> spec say about that).

The problem is, AFAIK, we make the thumbnails using Inkscape, probably 
with something like:
inkscape -f "file.svg" -e "file.png" -w 128.
Unfortunately, in order to keep the correct aspect ratio, we can't 
specify both width and height - see 
as an example.

In order to make the image fit on 128x128, we can run a script like the 
one below, which will process all PNGs from a directory.
for i in*.png; do convert -size 128x128 "$i" -resize 128x128 "$i
; done

> Then, we can put spacing between all the images so we don't need to
> worry about putting a frame around the image that is converted to a
> 128px square thumbnail.

I guess we can also use a second script, this time using combine to 
suprapose thumbnails over a 128x128 transparent PNG, but I have to dig 
for the exact parameters.

note: both convert and combine are part of ImageMagik (so should be 
available on a default Linux install).

> Please post thoughts to the wiki page...


More information about the clipart mailing list