Created
February 27, 2025 20:38
-
-
Save dockimbel/7542422cbcc3d2d99ff9263acd5d2bd0 to your computer and use it in GitHub Desktop.
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
Red [ | |
Needs: View | |
] | |
nb: 500 | |
list: [] | |
make-dir folder: %images-test/ | |
loop nb [ | |
append list img: make image! as-pair 100 + random 300 100 + random 300 | |
draw img [pen red line 1x1 100x100] | |
] | |
probe recycle | |
print "-- images created" | |
repeat i nb [ | |
save to-file reduce [folder i %.jpg] list/:i | |
save to-file reduce [folder i %.gif] list/:i | |
save to-file reduce [folder i %.png] list/:i | |
] | |
clear list | |
probe recycle | |
print "-- images saved, list cleared" | |
foreach img read folder/. [ | |
append list load file: folder/:img | |
delete file | |
] | |
delete folder | |
loop 3 [ | |
take/part list 1000 | |
probe recycle | |
] | |
print "-- images reloaded, then cleared" | |
probe length? list | |
probe recycle | |
probe stats/info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment