openfl / svg

Provides SVG parsing and rendering for OpenFL and Haxe
MIT License
68 stars 30 forks source link

Generating Expected Images for Tests #28

Closed ashes999 closed 8 years ago

ashes999 commented 8 years ago

Hi @jgranick and @ibilon ,

I would like your input on how we generate expected/good PNGs from SVGs for our tests. Currently, I have two SVGs (both circular logos) that I generated by rendering them in GIMP (which is free). This produced quite a big pixel difference (7% and 12%), mostly due to aliasing artifacts.

We need a "canonical" or "gold standard" renderer which we can use to generate these images. What comes to mind:

How would you like to proceed?

P.S. if you have a sizable body of SVGs on-hand which already render correctly, I would like to add those to the tests too.

ashes999 commented 8 years ago

It turns out GIMP does a reasonable job of this, and most of the circle artifacts disappear when you render larger images (256x256 instead of 64x64).

I'm okay with using GIMP for this for now. If you have feedback, please comment on this issue.