reading a .pgm file

Hello eveyone,
I want to know how to read a .pgm file from my hdd and store it in a 2d array so i can perform some action on the array later on.
This is ny first time working with an imqge in c so i know nothing about it. .
Please explain the procedure to me.
Thanks.
Last edited on
Obviosuly to my knowledge (as I am still a learner), such files are read through binary format..use binary read syntax in C++. btw why use 2d array? 2d array are not good

http://www.cplusplus.com/articles/DzywvCM9/

http://www.cplusplus.com/forum/articles/17108/
> Obviosuly to my knowledge (as I am still a learner)
If you've just started learning, don't consider things obvious

http://en.wikipedia.org/wiki/Netpbm_format#File_format_description


> I want to know how to read a .pgm file from my hdd and store it in a 2d array
¿and what is giving you trouble?
¿do you not know how to read from a file, or to traverse an array?
.¿is the format too complicated?
r u chinese?
Topic archived. No new replies allowed.