Re: [Jmagick] Testing JMagick
| From:Bob Friesenhahn [bfriesen@masked-domain] |
| Sent on:Thu, 28 Feb 2008 09:43:50 -0600 (CST) |
| In reply to:[Jmagick] Testing JMagick sent on Thu, 28 Feb 2008 11:55:12 +0545 by "Jacob Nordfalk" [jacob.nordfalk@masked-domain] |
On Thu, 28 Feb 2008, Jacob Nordfalk wrote:
>
> For those that don't know about Unit testing, the idea is to write
> some methods that use JMagick in different ways and then to compare
> the result against expected values and report an error if the results
> are not as expected. See also http://junit.org/ and
> http://junit.sourceforge.net/junit3.8.1/index.html .
I have been through this a number of times before, having written the
test suites for ImageMagick, GraphicsMagick, and Magick++. When
comparing output images against a reference image, you really need to
do a statisical comparison rather than absolute. Otherwise
differences between Q8/Q16/Q32 will cause test failure. Formats like
JPEG are lossy so they require a large "fudge factor". I think that
reference images should be generated using a Q8 build since they
represent the maximum variation from the "one true image" and the
files are likely to be smaller. Dealing with fonts is a major problem
since each version of FreeType produces different results, and glyph
hinting (FreeType compile-time options) can make a huge difference in
the output. There are similar problems with PDF and Postscript.
Bob
======================================
Bob Friesenhahn
[bfriesen@masked-domain], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
JMagick mailing list
[JMagick@masked-domain]
http://www.yeo.id.au/mailman/listinfo/jmagick
Please ensure that [JMagick@masked-domain] is a recipient when replying.
Other messages in this topic