Create replace.py
Browse files- replace.py +4 -0
replace.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
for i in range(x, x + width):
|
| 2 |
+
for j in range(y, y + height):
|
| 3 |
+
# Invert pixel values (assuming 3 channels - BGR)
|
| 4 |
+
image[j, i] = 255 - image[j, i]
|