(Solved) : Write C C Function Following Function Header Get Color Components Pixel Located X Y Pixel Q35538287
write a C/C++ functionwith the following function header to get the color components of apixel located in (x, y) from the pixel data buffer of a bmpfile.
int getColor (BMPImage *bmp; int x, int y, int *red, int *green,int *blue);
Assuming that the pixel coordinate of the lowerleft-hand corner is (0,0). We also assume that the file is read andthe pixel map is loaded to the buffer. The function should return-1 if (x, y) is out of range, otherwise return 0 and the colorcomponents should be saved in parameter red, green andblue.