
Thank you PeeJay, I'll see POLYVECTOR command.
I need to convert pixels to black&white before to put in the screen
I have now this code, but while it is putting pixels, the screen is degradated
// this code will put an image pixel by pixel
// but the image is being degradated while pixels is putting in screen
SETSCREEN 640, 480, 0 // MODO GRAFICO
LIMITFPS 60
ZX_SCREEN("d:/test.png", 640, 480, 0,0, 2)
MOUSEWAIT
FUNCTION ZX_SCREEN:grafico$, zwidth, zheight, x, y, velocidad
LOCAL gx, gy, pixel
BLACKSCREEN
GRABSPRITE 2, 0,0, zwidth, zheight // create a black sprite
LOADSPRITE grafico$, 1
FOR gy = 0 TO zheight - 1
FOR gx = 0 TO zwidth - 1
DRAWSPRITE 1, 0,0 // draw original image
pixel = GETPIXEL(gx, gy)
IF pixel > RGB(255,255,255)/2
pixel = RGB(255,255,255) // white
ELSE
pixel = RGB(0,0,0) // black
ENDIF
DRAWSPRITE 2, 0,0
SETPIXEL gx, gy, pixel
GRABSPRITE 2, 0,0, zwidth, zheight // update black sprite
SHOWSCREEN
NEXT
NEXT
ENDFUNCTION
Sorry for my bad english
