start:
cls
input "max. brightness to bloom: (38-255)",br
if bitmap exist(1)=0 then create bitmap 1,255,255
set current bitmap 1
lock pixels
for x=0 to 255
for y=0 to 255
dot x,y,rgb(x,y,(x+y)/2)
next y
next x
for x=50 to 200
for y=50 to 200
dot x,y,rgb(x*1.277,y*1.277,((x*y)/2)*1.277)
next y
next x
for x=100 to 240 step 10
ink rgb(x,x,x),0
text 50,340-x,"HELLO"
ink rgb((x^2/300)-50,(x^2/300)-30,x^2/300),0
text x,20,"[]"
next x
unlock pixels
get image 1,0,0,255,255,1
set current bitmap 0
cls
set cursor 256,256
print "50%"
sync
set current bitmap 1
if br<55 then f#=2.5 else f#=0.0
lock pixels
a=0
repeat
for x=0 to 255
for y=0 to 255
if rgbr(point(x,y))*rgbb(point(x,y))*rgbg(point(x,y))>br^3
if rgbr(point(x,y))<245
 r=rgbr(point(x,y))+((rgbr(point(x,y))^2)/4000)-5+f#
else
 r=250
endif
if rgbg(point(x,y))<245
 g=rgbg(point(x,y))+((rgbg(point(x,y))^2)/4000)-5+f#
else
 g=250
endif
if rgbb(point(x,y))<245
 b=rgbb(point(x,y))+((rgbb(point(x,y))^2)/4000)-5+f#
else
 b=250
endif
dot x,y,rgb(r,g,b)
endif
next y
next x
inc a
until a>int((300-br)/70)
 
unlock pixels
get image 2,0,0,255,255,1
set current bitmap 0
cls
do
if spacekey()
paste image 1,0,0
else
paste image 2,0,0
endif
set cursor 256,256
print "DONE"
print "Hold Space to see old Image"
print "Press Return to restart"
sync
if returnkey() then goto start
loop