From: Andrew S. <str...@as...> - 2009-09-22 20:51:43
|
Michael Droettboom wrote: > Jouni K. Seppänen wrote: > >> I am thinking about adding pdf comparison ability to compare_images. One >> simple way to do this would be to convert pdf files to pngs using >> Ghostscript: if we store reference pdf files, and both the reference >> file and the result of the test are converted using with exactly the >> same version of gs, there should be no font-rendering or antialiasing >> mismatches. >> >> Can we assume that all test computers will have some version of >> Ghostscript installed and callable as "gs"? >> >> > We can probably standardize the version of gs on the buildbot machines, > but it's been very useful up to now to have tests that can run on a > variety of developer machines as well. > > I don't know how different the output will be from different versions of > gs -- maybe we should just try it and see. I have a pretty old version > of gs on my RHEL4 box (7.07). If you want me to send you a png of a > particular pdf to directly compare with yours before you even start with > the test infrastructure, I'm happy to do that. > I understood Jouni's idea to be to save the .pdfs as baseline images -- then the same version of gs would be used to generated the rasterized images for the baseline and test result -- the version on your computer. I think this is the way to go (either that or compare the PDFs directly somehow). Anyhow, allowing the test infrastructure to support testing multiple backends is why I removed file extensions from the test image name in the first place, so anything along these lines should hopefully be quite doable. We could add a keyword arg to the image comparison decorator that specified which image formats to test. Alternatively, it could perform comparisons based on the presence baseline images of known extensions. -Andrew |