[Clipart] thumbnails size

Bryce Harrington bryce at bryceharrington.com
Wed Sep 1 11:48:42 PDT 2004


On Wed, 1 Sep 2004, Jeremy C. Reed wrote:
> But an idea would be to use some ImageMagick tool or other to crop out the
> 80x80 section from middle of every PNG.
> 
> Maybe like:
> 
> convert -crop 80x80+1+1
> (but I don't know how to get it from the center.)

Erf, I don't think that'd produce very good results...  E.g. if the
giraffe thumbnail cut off its head and feet, then I think people would
assume the svg was busted and wouldn't download it.

A better algorithm would calculate the expected height and width prior
to rendering, then 
   if height > 80 and height x width > 80 x 80, use -h 80
   else use -w 80
Or something like that (maybe we could fudge to allow height up to 100
before limiting it.

> Can inkscape do this when converting instead?

No, inkscape's export function is pretty basic.

> By the way, the thumbnails take up about 13MB of space. Can they be
> compressed or made lower quality too?

If you'd like to work on the scripts, get the lastest SVG::Metadata
package from cpan.org; they're all in the scripts directory.  Send me
patches and I'll incorporate them for the next release.

One thing to look at regarding thumbnails is using svg2png instead of
inkscape, because (in theory) it should run faster.

Bryce



More information about the clipart mailing list