[Clipart] thumbnails size

Bryce Harrington bryce at bryceharrington.com
Wed Sep 1 13:40:16 PDT 2004


On Wed, 1 Sep 2004, Carl Worth wrote:
> On Wed, 1 Sep 2004 11:48:42 -0700 (PDT), Bryce Harrington wrote:
> > One thing to look at regarding thumbnails is using svg2png instead of
> > inkscape, because (in theory) it should run faster.
> 
> I've started taking a look at this.
> 
> We've got svg2png installed on the freedesktop.org server so others can
> play with this too.
> 
> I have no idea how fast inkscape is, but svg2png takes about 2 minutes
> to make width-80 thumbnails for everything in release 0.06. It also
> failed to parse 6 of the images, (I'm not sure why yet).

2 min is a big improvement over inkscape.  (Order of magnitude-ish)

> 	~/openclipart-0.06:$ time for svg in `find . -name '*.svg'`; do svg2png --width=80 $svg ${svg/.svg/-svg2png.png}; done
> 	svg2png: failed to render ./icons/palette.svg
> 	svg2png: failed to render ./Examples/00_strawberry_border/strawberry_border.svg
> 	svg2png: failed to render ./computer/palette.svg
> 	svg2png: failed to render ./decorations/flourish_two_vertical_01.svg
> 	svg2png: failed to render ./flourish/flourish_two_horizontal_01.svg
> 	svg2png: failed to render ./shapes/flourish_two_vertical_01.svg

I'd suggest taking these files and testing them in Inkscape (and/or
Batik), and if they otherwise look valid, posting them as examples to
the Cairo list.

> I've looked through a few directories of the resulting images, and
> beyond those 6 failures, svg2png still has a few rendering problems,
> (some of these are known bugs in cairo already):
> 
> 	1) Cairo does not properly dash splines
> 
> 	2) Cairo is not apply caps properly to all dash segments
> 
> 	3) Cairo is not properly putting caps on all sub-strokes in a
>            complex path
> 
> 	4) On some stroked ellipses, svg2png is drawing a segmeent from
>            the center out to one edge.
> 
> 	5) There seems to be a disagreement between svg2png and inkscape
>            on the opacity of gradients. This is most noticeable in
>            seahorse.svg.
> 
> Other than those issues, the results are quite comparable for the most
> part, (at least for the few directories of images I looked through).

Cool.  This suggests some testing work we could possibly help with -
identifying clipart that renders differently with different renderers
could give SVG tool developers some samples to work from.

> So, it doesn't look like svg2png is quite ready today, (from the point
> of view of functionality), but none of these bugs look impossibly hard.

Okay, cool, thanks for checking into it.  Sounds like we should stick
with Inkscape for the time being.  For 0.06 I simply overlayed the new
stuff over the 0.05 things, so I didn't have to re-generate the
thumbnails for older files.  I can continue doing this for the near/mid
term, until svg2png catches up.

> So, thank you very much, Open Clipart Library, for the large number of
> test cases! This is great for svg2png/cairo, as we've definitely seen a
> new bug or two here. Any help fixing those would of course be
> appreciated.

:-)

Bryce



More information about the clipart mailing list