Created
March 26, 2017 21:19
-
-
Save iptq/a7958fd7b5fff2c7b04de034cb9bc199 to your computer and use it in GitHub Desktop.
VC Solution
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
#!/usr/bin/env python | |
from PIL import Image | |
A = Image.open("A.png") | |
B = Image.open("B.png") | |
dA = A.load() | |
dB = B.load() | |
C = Image.new("RGB", (370, 370), "white") | |
for x in range(370): | |
for y in range(370): | |
a = dA[x, y] | |
b = dB[x, y] | |
v = a ^ b | |
C.putpixel((x, y), (v, v, v)) | |
C.save("C.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment