Show a basic storage type to handle a simple RGB raster graphics image,
and some primitive associated functions.

If possible provide a function to allocate an uninitialised image,
given its width and height, and provide 3 additional functions:

   one to fill an image with a plain RGB color,
   one to set a given pixel with a color,
   one to get the color of a pixel.


(If there are specificities about the storage or the allocation, explain those.)

These functions are used as a base for the articles in the category raster graphics operations, 
and a basic output function to check the results
is available in the article write ppm file.




-- Creates a new image object of size 640x480 pixel and 32-bit color depth
img = image(640, 480, 32)
 
-- Fills image with plain red
img.fill(img.rect, rgb(255,0,0))
 
-- Gets the color value of the pixel at point (320, 240)
col = img.getPixel(320, 240)
 
-- Changes the color of the pixel at point (320, 240) to black
img.setPixel(320, 240, rgb(0,0,0))