Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Grayscale-image/BASIC256/grayscale-image.basic
Normal file
23
Task/Grayscale-image/BASIC256/grayscale-image.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
w = 143
|
||||
h = 188
|
||||
name$ = "Mona_Lisa.jpg"
|
||||
graphsize w,h
|
||||
imgload w/2, h/2, name$
|
||||
fastgraphics
|
||||
|
||||
for x = 0 to w-1
|
||||
for y = 0 to h-1
|
||||
p = pixel(x,y)
|
||||
b = p % 256
|
||||
p = p \256
|
||||
g = p % 256
|
||||
p = p \ 256
|
||||
r = p % 256
|
||||
l = 0.2126*r + 0.7152*g + 0.0722*b
|
||||
color rgb(l,l,l)
|
||||
plot x,y
|
||||
next y
|
||||
refresh
|
||||
next x
|
||||
|
||||
imgsave "Grey_"+name$,"jpg"
|
||||
Loading…
Add table
Add a link
Reference in a new issue