This
code golf challenge explains a cool algorithm for making an image look "icy" and "wintery". I'm working on entering it, but it requires a Manhattan-distance blur which is slow as molasses. This version uses a box blur which is quite speedy and still produces the same effect.
The
DBPro code will prompt for an image filename, and then the blur radius (larger blur radii will be exponentially slower. 8 is a good value).
EDIT: Requires Matrix1 for min and max.
input ">",f$:input ">",n:m=n/2
load image f$,1:w=image width(1):h=image height(1)
create bitmap 1,w*2,h*2:paste image 1,0,0:lock pixels
for o=0 to 1:for x=0 to w-1:for y=0 to h-1:if o
//Pick random pixels in n/2
u=max(x-m,0):v=max(y-m,0)
dot x+w,y,point(rnd(min(x+m,w-1)-u-1)+u,rnd(min(y+m,h-1)-v-1)+v+h)
else
//Box blur (n) and blue shift 1.5
c#=0:r=0:g=0:b=0
for u=max(x-n,0) to min(x+n,w-1):for v=max(y-n,0) to min(y+n,h-1)
t=point(u,v)
inc c#
r=r+rgbr(t)
g=g+rgbg(t)
b=b+rgbb(t)
next v:next u
dot x,y+h,rgb(r/c#,g/c#,min(255,1.5*b/c#))
endif:next y:next x:next o
unlock pixels:copy bitmap 1,0:get image 2,w,0,w*2,h,1:save image "out.png",2:wait key
Example: EDIT: see attachments
</div>
I published a game!