[cairo] Re: ANN: SVG_RenderTest 0.2
Bryce Harrington
bryce at bryceharrington.org
Wed Oct 26 12:22:40 PDT 2005
SVG_RenderTest 0.2 can be gotten here:
https://sourceforge.net/project/showfiles.php?group_id=93438&package_id=157539
This test compares rendering capabilities of several SVG renderers.
It also generates visual "diffs" between the output of the renderers,
and assigns a score for how close they match a 'truth' image (such as
generated by batik).
ChangeLog for Version 0.2:
* Implemented use of inkscape's height/width query capability to
determine image's aspect ratio
* Added -h HEIGHT flags for all renderers
* Added ksvgtopng
* Conversion of svgfile to absolute path (for ksvgtopng)
* Added command line parameter for location of input files
* Added check to ensure mdiffer exists; if not, give pkg name
and url
* Added a usage() function
The two main changes for this release are adding KDE's ksvgtopng
renderer, and adding support for specifying both height and width
output. It had been noticed in version 0.1 that each renderer makes
different assumptions about what height to use if only the width was
specified; in version 0.2 we use Inkscape's --query-width and
--query-height, determine the image's aspect ratio, calculate height
given a width, and then specify -h and -w options to all renderers.
>From some initial test runs, it looks like this improves the situation
considerably but doesn't fix 100% of all situations. I'm still seeing
some offsets and aspect ratio problems for certain files; not sure if
this is due to inkscape's aspect ratio calculations or differences in
assumptions between renderers, but I expect to be doing more tinkering.
Anyway, despite being far from perfect, the motivation for this release
was to get these changes out there. I'm hoping to sync up with the work
Uraeus is doing, and set up something that can automatically run the
test.
Bryce
On Mon, Jul 11, 2005 at 08:12:12AM +1000, cairo-owner at cairographics.org wrote:
> You are not allowed to post to this mailing list, and your message has
> been automatically rejected. If you think that your messages are
> being rejected in error, contact the mailing list owner at
> cairo-owner at cairographics.org.
>
> Date: Sun, 10 Jul 2005 15:12:26 -0700
> From: Bryce Harrington <bryce at bryceharrington.com>
> To: Stephen Silver <ocalocal at btinternet.com>
> Cc: OCAL list <clipart at lists.freedesktop.org>, inkscape-devel at lists.sf.net,
> cairo at lists.freedesktop.org, librsvg-devel at lists.sf.net
> Subject: ANN: SVG_RenderTest 0.1 (was Re: [Clipart] Anyone try librsvg2 on the
> clipart)
>
> On Sat, Jul 09, 2005 at 10:11:21PM +0100, Stephen Silver wrote:
> > Jon Phillips wrote:
> > > On Sat, 2005-07-09 at 15:02 +0100, Stephen Silver wrote:
> > > > We should try to make the SVG files as portable as possible.
> > > Did you file a bug on our bug tracker.
> > I'm compiling a list of problematic SVG files in release 0.15.
> > So far I've found 49.
>
> Okay... I think it's time to take our SVG QA up a notch. ;-)
>
> SVG_RenderTest is a new test program for doing regression testing of SVG
> rendering. You can download it from the Inkscape File downloads page,
> or directly from here:
>
> https://sourceforge.net/project/showfiles.php?group_id=93438&package_id=157539
>
> `runtest` is a bash script that takes *.svg files in the current
> directory and attempts to render them into png's using Inkscape,
> librsvg, cairo, and batik. It reports PASS or FAIL for each. )See the
> README for the full list of programs that this test expects to be
> installed.)
>
> It also performs a visual 'diff' of the rendered images using the
> Motiontrack software. This calculates a score showing how relatively
> different the images are, and also generates a PNG that visually
> displays the brightness difference of the files.
>
> Here is an example of the results this test generates:
>
> 1.inkscape PASS : 0 b_w_tiger_susan_park_01
> 1.librsvg PASS : 0 b_w_tiger_susan_park_01
> 1.cairo PASS : 0 b_w_tiger_susan_park_01
> 1.batik PASS : 0 b_w_tiger_susan_park_01
> 1.cairo-mdiff FAIL : 2 b_w_tiger_susan_park_01
> 1.inkscape-mdiff FAIL : 8 b_w_tiger_susan_park_01
> 1.librsvg-mdiff FAIL : 2 b_w_tiger_susan_park_01
> 2.inkscape PASS : 0 daggers
> 2.librsvg PASS : 0 daggers
> 2.cairo PASS : 0 daggers
> 2.batik PASS : 0 daggers
> 2.cairo-mdiff FAIL : 7 daggers
> 2.inkscape-mdiff FAIL : 8 daggers
> 2.librsvg-mdiff FAIL : 7 daggers
> 3.inkscape PASS : 0 sword_hanger
> 3.librsvg PASS : 0 sword_hanger
> 3.cairo PASS : 0 sword_hanger
> 3.batik PASS : 0 sword_hanger
> 3.cairo-mdiff FAIL : 1 sword_hanger
> 3.inkscape-mdiff FAIL : 8 sword_hanger
> 3.librsvg-mdiff FAIL : 1 sword_hanger
>
> The numbers in the third column are either the exit code or, in the case
> of mdiff, a score that shows the relative difference between batik's
> output and the output from the given program. The higher the score, the
> worse the difference.
>
> You can see examples of the visual diffs here:
>
> http://www.inkscape.org/svg_rendertest_example/
>
> The motivations for this test are to help:
>
> 1. Regression testing of known bad SVG's (i.e. for Inkscape QA)
> 2. Compliance testing of Inkscape against the W3C test suite
> 3. SVG compatibility testing between different SVG rendering engines
> 4. Testing of the Open Clip Art Library images (ob OCAL thread)
>
> This first release works well enough on my machine, but certainly leaves
> plenty of room for improvement. ;-) Please send me patches if you have
> ideas for improvements or spot bugs.
>
> Enjoy,
> Bryce
>
More information about the cairo
mailing list