#module
#deffunc monotone int, int, int, int, int
mref id, 0 : mref x, 1 : mref y, 2 : mref w, 3 : mref h, 4
ginfo 1
buffer id, w, h, 1
repeat 256 : palette cnt, cnt, cnt, cnt : loop
palfade
gcopy prmy, x, y, w, h
gsel prmy
pos x, y : gcopy id, , , w, h
return
#global
objsize winx / 2, 25
pos winx / 2 * 0, 0 : button "画像読込", *load
pos winx / 2 * 1, 0 : button "グレースケール化", *change
stop
*load
dialog "bmp;*.jpg;*.mag", 16
if stat {
buffer 2
picload refstr
i = winx, winy
gsel 0
pos 0, 25 : gzoom winx, winy - 25, 2, , , i, i.1
}
stop
*change
monotone 2, , 25, winx, winy - 25
stop
|