Is there any way to take an image file (bmp, png, or something) and turn it into an array, or at least get the rgb value of a pixel? If not, can you tell me any good libraries to do so?
Thanks
If you want to support all kinds of formats, use OpenCV. OpenCV is a feature-rich (and correspondingly heavy-weight) tool suit for image-processing. It also comes with a whole bunch of datatypes, as well as image processing and vision tasks primitives.
If you prefer a light-weight alternative, I recommend LodePNG which only requires you to copy two files to get image read and write functionality. However, it only supports PNG and BMP. This thread discusses further alternatives. These alternatives usually just give you 2D arrays for images without proper datatypes or further processing tools.
Use the OpenCV to read the image into a Mat object. And the you can get every pixel and its rgb value you want from Mat.