Feature #3: Color of the 10th pixel

Print the color in RGB of the tenth pixel (coordinates 9, 0) in the output terminal.

Feature description

Print the color in RGB of the tenth pixel (coordinates 9, 0) in the output terminal. A possible prototype:

void tenth_pixel (char *source_path);
Parameters value
name tenth_pixel
Command -c tenth_pixel
Input an image that has at least a width of 10 pixels
output tenth_pixel: R, G, B
R, G, B are the integer values of the components in the range 0-255

Usage

freud.exe -f ./images/input/image.jpeg -c tenth_pixel 

Output

tenth_pixel: 86, 136, 161

Describe tips for implementing feature

Use the data from the function read_image_data from <estia-image.h>.

int read_image_data(const char *filename, unsigned char **data, int *width, int *height, int *channel_count);

The components R, G, B of the tenth pixel are the located at 27, 28 and 29 in the data array. (the first pixel is index 0, so the tenth is index 9). Read the page about how images are stored and the estia-image documentation. Call tenth_pixel in src/main.c. See the helloworld example to correctly call the function.