File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 5
5
from PIL import Image
6
6
from pixelsort import pixelsort
7
7
8
+
8
9
def randomize_params ():
9
10
angle = r .randint (90 , 359 )
10
11
@@ -55,19 +56,21 @@ def randomize_params():
55
56
args ['lower_threshold' ] -= 0.25
56
57
return args
57
58
59
+
58
60
def perform_sorting (args , img ):
59
61
# --- PERFORM PIXELSORT WITH RANDOMIZED PARAMS ---
60
62
new_img = pixelsort (
61
- image = img ,
62
- angle = args ['angle' ],
63
- interval_function = args ['interval_function' ],
64
- lower_threshold = args ['lower_threshold' ],
65
- upper_threshold = args ['upper_threshold' ],
66
- randomness = args ['randomness' ],
67
- sorting_function = args ['sorting_function' ]
63
+ image = img ,
64
+ angle = args ['angle' ],
65
+ interval_function = args ['interval_function' ],
66
+ lower_threshold = args ['lower_threshold' ],
67
+ upper_threshold = args ['upper_threshold' ],
68
+ randomness = args ['randomness' ],
69
+ sorting_function = args ['sorting_function' ]
68
70
)
69
71
return new_img
70
72
73
+
71
74
def Main ():
72
75
# --- DEFINE ARGS AND SET DEFAULTS ---
73
76
count = 0
You can’t perform that action at this time.
0 commit comments