I've been hacking my brais trying to figure this out and all the resources I keep using get me errors. I'm using Dev-C++ and I can't figure out the code to simply take a pgm file (let's call it test.pgm) and open it or read it and then store it as a 2D array. Is there a function like in MATLAB or something. In MATLAB it's rather simple. All you do is:
Code:
A = imread('test.pgm');
This will put the image in matrix A, and then you can play arround with it from there. How does this work in Dev-C++?