generated from PythonForChange/Egg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
28 lines (21 loc) · 689 Bytes
/
example.py
File metadata and controls
28 lines (21 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from egg.resources.structures import *
x = Image()
x.load("example.jpg")
import matplotlib.pyplot as plt
import numpy as np
plt.imshow(np.array(x.matrix))
M = [[255,0,0,255,255,255,0,255], [0,0,0,255,255,255,0,255], [0,255,0,255,0,255,0,255], [0,255,255,255,255,255,0,255], [0,255,255,255,255,255,0,255], [0,0,255,255,255,0,0,255], [0,0,255,255,0,0,0,255], [0,0,255,255,0,0,0,255]]
matriz = Image()
matriz.loadFromBW(M)
matriz.printRGB()
jj = [[[242, 80, 34], [127, 186, 0]], [[0, 164, 239], [255, 185, 0]]]
m = Image()
m.loadFromRGB(jj)
m.printRGB()
m.bias = [255, 0, 0]
m.printRGB()
x = Image()
x.load("example.jpg")
x.printRGB()
x.printBW()
#m.save("micro.jpg") # Not working yet