[PEPr] Comment on Images::Image_Diff
| From: | Matthew Fonda | Date: | Thu, 03 Sep 2009 19:44:44 +0000 |
| Subject: | [PEPr] Comment on Images::Image_Diff | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52761@lists.php.net to get a copy of this message | ||
Looks great so far! A few minor comments:
- Image_Diff::handleFileErrors() could probably be protected instead of
private
- In Image_Diff::nearlySame(), it may be better to check if the parameters
are gd resources instead of checking if they are string, that way at the
point where you first call gd functions you are 100% sure you are passing
them a valid image resource.
- It might be nice to return the measure of difference instead of just
true/false
On a side note, the ImageMagick 'compare' utility has some cool features
such as outputting an image highlighting the differences between the two
images being compared. I'm not sure how difficult that would be to
implement, but it could be a cool feature to have!
--
http://pear.php.net/pepr/pepr-proposal-show.php?id=611