Created
March 26, 2011 13:56
-
-
Save hhatto/888295 to your computer and use it in GitHub Desktop.
pgmagick image diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pgmagick import Image | |
from pgmagick import CompositeOperator as co | |
img_a = Image('a.jpg') | |
img_b = Image('b.jpg') | |
img_c = Image('c.jpg') | |
print img_a.compare(img_b) | |
print img_a.compare(img_c) | |
#img_a.composite(img_b, 0, 0, co.DifferenceCompositeOp) | |
img_a.composite(img_c, 0, 0, co.DifferenceCompositeOp) | |
img_a.write('diff.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment