how do I read out the RGB values of an image (jpeg, png, gif, tiff) on Linux ?
I'd like to pass the location of an image to a function that reads out the RGB values of each pixel,
calculates the total sum, then returns r_total, g_total, b_total as array.
I understand I need two for loops for width and height, but I don't know how to access the data.
Could someone provide an example please?