Hi,
here is a small mosaic picture demo.
just click the left mousebutton and see what happens.
include "sw.inc"
Window 640, 480, 1
Sub BigPixel(sys x1,y1,x2,y2,w,h)
sys x, y, r, g, b, color
x = x1
y = y1
while y <= y2-h
color = GetPixel x,y
r = GetValueR color
g = GetValueG color
b = GetValueB color
DrawPoint x, y, w, h, RGB(r,g,b)
x = x + w
if x >= x2 - w
x = x1
y = y + h
end if
wend
End Sub
bild= LoadBmp "bmp/bild1.bmp",0
sys a
Text 160,100,"WAIT.....",0
Sync
DrawBmp bild,0,0,640,480,0
For a=1 to 34
SetCaption "PIXELS ARE NOW " a + "x" + a
DrawBmp bild,0,0,640,480,0
BigPixel 0,0,640,480,a,a
WaitMouse
Next
Quit
X