On Sat, Mar 26, 2011 at 8:28 PM, Ian Turton <[email protected]> wrote:
> Some googling threw up glean and Piglit
> (http://www.winehq.org/pipermail/wine-devel/2009-September/078607.html)
> which are in C++ and The Batik tests
> (http://xmlgraphics.apache.org/batik/dev/test.html) which is Java and
> claims to handle variations (not sure how).

In a most crude way. The code that actually compares the images is here:

/**
     * Compare the two input streams
     */
    protected boolean compare(InputStream refStream,
                              InputStream newStream)
        throws IOException{
        int b, nb;
        do {
            b = refStream.read();
            nb = newStream.read();
        } while (b != -1 && nb != -1 && b == nb);
        refStream.close();
        newStream.close();
        return (b == nb);
    }

that is... it's expecting the very bytes of the encoded image
to be the same. To allow for some variations they have an
"accepted variation" subfolder that allows for some alternate
images.
That is not what I was looking for, do we want an alternate image
for each possible jdk, font and antialiasing difference?
Hmmm... nope? :-)

> Anyway I think this is a good idea and I'll continue thinking about
> the best way to do it.

Actually people pointed me at perceptual diff quite a bit of time ago,
but in my stubborness I would not accept an external tool, I wanted
everything to be nicely self contained... the result every time I touch anything
in the rendering chain I have to make a ton of manual checks, and
even with those I leave everybody down with such a stupid error.

I think a reasonable way forward could be to start using perceptual diff,
but encapsulate its usage in a java wrapper that could be evolved
in portable java code if anybody finds the time to do it.
But in the meantime we'd at least get some decent testing on machines
that do have perceptual diff available...

Cheers
Thank you

> Ian
> --
> Ian Turton
>
>



-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to