Routines



PutPix routine


Set the color attribute of one certain pixel in a color image object in the memory.

required external library: image

int PutPix( Image img, unsigned int x, unsigned int y, Color color);


Parameters

img [in] Image variable that embed the image in memory
x [in] column of pixel whose colour is about to changed
y [in] line of pixel whose colour is about to changed
color [in] a Color object that embeeds the red, green and blue attributes of the color

Return values

If the pixel line and column direct to outside the image boundary, no pixel graylevel is set and the routine's return value is 0. Otherwise is 1.

Example code

loadlib image;


Image i;
Color col;
main()
{
...
LoadImage(i,"anger.bmp");
SetRGB(col,30,200,45);
PutPix(i,10,10,col);
}


Requirements

  • external dynamic link library: image.dll on the server


  • If interested in this project, please fell free to contact the personnel of our group. The project leader is dr.drs. L.J.M. Rothkrantz