We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c344bb commit 48e05a4Copy full SHA for 48e05a4
Steganography/scrambled1.png
193 KB
Steganography/scrambled2.png
Steganography/xor_images.py
@@ -0,0 +1,30 @@
1
+#!/usr/bin/python
2
+
3
+from PIL import Image
4
5
+scrambled1 = Image.open('scrambled1.png')
6
+scrambled2 = Image.open('scrambled2.png')
7
+size = width, height = scrambled1.size
8
9
+new = Image.new('RGB', size)
10
11
+scrambled1 = scrambled1.load()
12
+scrambled2 = scrambled2.load()
13
+data = new.load()
14
15
+for x in range(width):
16
+ for y in range(height):
17
18
+ one = scrambled1[x,y]
19
+ two = scrambled2[x,y]
20
21
+ new_color = (one[0] ^ two[0],
22
+ one[1] ^ two[1],
23
+ one[2] ^ two[2])
24
25
+ data[x,y] = new_color
26
27
+new.save('result.jpg')
28
+new.show()
29
30
+#Comparing two images using XOR pixel values of 2 images to create a new image that combines visual information from 2 image source
0 commit comments