ImageSetPixel
ImageSetPixel (Statement)
Format
imagesetpixel image, x, y, color
imagesetpixel image, x, y
Description
Sets the single pixel at (x, y) in an image held in memory to color (see Rgb). image is the identifier returned by ImageNew, ImageLoad, or ImageCopy.
If color is omitted, the current pen color (as set by Color) is used.
Read a pixel back with ImagePixel.
Example
a = imagenew(50, 50, rgb(0,0,0))
for x = 0 to 49
imagesetpixel a, x, x, rgb(255,255,0) # yellow diagonal
next x
imagedraw a, 0, 0
See Also
ImageAutoCrop, ImageCentered, ImageCopy, ImageCrop, ImageDraw, ImageFlip, ImageHeight, ImageLoad, ImageNew, ImagePixel, ImageResize, ImageRotate, ImageSetPixel, ImageSmooth, ImageTransformed, ImageWidth, Unload
Availability
BASIC-256 2.0 and later. Documented from the BASIC-256 v2.1 continuation project.