Hi,

I implemented the pdiff [1] algorithm in PHP, just converted the cpp
code to PHP, and it is far to slow, to even think of possible
optimizations (and I don't see any real optimizations). It takes about
1m and 30s to compare a single small image on my machine. This would be
a major slow down of our test cases, as I currently compare about 75
bitmaps in my tests (would result in a 2h run, without code coverage ;).

So what are the options?

1) pdiff now compiles without patching and can compare PNGs with one
patch [2] in no time. Is it an option to wait for the patch beeing
included and make it an requirement for testing the bitmap stuff?

2) We could convert the cpp code to c and make a pecl extension out of
it. This would be far easier to install, on not a really big issue.

3) Evaluate other algorithms / alternatives. The pdiff algorithm works
really well (and it is beautiful, look at the code :), and I personally
ran out of options.

4) Stay with imagemagick compare, and increase the expected maximum
noise distance, but I think we are already beyond any proper testing
with the current maximum noise distances.

[1] http://sourceforge.net/projects/pdiff
[2]
http://sourceforge.net/tracker/index.php?func=detail&aid=1748226&group_id=166838&atid=840552

I attached my (not completely working) PHP implementation, if you want
to test it yourself, or take a more detailed look at the code. It still
has some bug, but fixing this wouldn't solve the performance problem.

-- 
Mit freundlichen Grüßen / Med vennlig hilsen
 
Kore Nordmann (GPG: 0xDDC70BBB)
eZ Components Developer
eZ systems Headquaters

tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751
[EMAIL PROTECTED] | eZ systems | ez.no

Attachment: pdiff.php
Description: application/php

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to