mzapo_canvas.c
RGB GetPixelValue(int x, int y, Canvas* img_canvas){
	RGB rgb;
	
	int index = (y*img_canvas->w)*3 + x*3;
	rgb.R = img_canvas->img[index];
	rgb.G = img_canvas->img[index + 1];
	rgb.B = img_canvas->img[index + 2];
	
	return rgb;
}
/*  This function will from X and Y coordinates extract color from canvas.  */
This function will from X and Y coordinates extract color from canvas.
This function will from X and Y coordinates extract color from canvas .
RGB GetPixelValue(int x, int y, Canvas* img_canvas){
	RGB rgb;
	int index = (y*img_canvas->w)*3 + x*3;
	rgb.R = img_canvas->img[index];
	rgb.G = img_canvas->img[index + 1];
	rgb.B = img_canvas->img[index + 2];
	return rgb;
}
RGB GetPixelValue ( int x , int y , Canvas * img_canvas ) { RGB rgb ; int index = ( y * img_canvas -> w ) * 3 + x * 3 ; rgb . R = img_canvas -> img [ index ] ; rgb . G = img_canvas -> img [ index + 1 ] ; rgb . B = img_canvas -> img [ index + 2 ] ; return rgb ; }
This function will from X and Y coordinates extract color from canvas.
This function will from X and Y coordinates extract color from canvas .