Routines



GetPix routine


Get the color attributes of one certain pixel in a color image object in the memory.

required external library: image

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


Parameters

img [in] Image variable that embed the color 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 [out] 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, the graylevel output parameter is not set according to the graylevel of specified pixel and the routine's return value is 0. Otherwise is 1.

Example code

loadlib base;
loadlib image;


Image i;
Color col;
main()
{
...
LoadGrayImage(i,"anger.bmp");
GetPix(i,10,10,col);
printf("Color attributes of the pixel are: R[",GetRed(col),"] G[",GetGreen(col),"] B[",GetBlue(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