Hello everyone, tim here.
I am trying to use/modify a program to model a material in a 2D space. The shape is not too complicated. Now my thought is, instead of drawing it using the functions(which give me a headache, considering the shape has to be split to many piece for drawing), I would draw it using a graphic processing program(photoshop etc) or just import the image from a digital camera. The drawing process should be simple like filling the pixel according to data, cause the material is the same.
Now the problem is, I dont know how to read a image data(I think I should convert it into something like binary?). If I can convert the image data to a binary file, how to process it next? Using ifstream can read the data to memory, it seems(I have not used it before). And then how can I operate the data?
I am using vs 2008 compiling the c++ program. And its just a console program(not using winforms, this program is made by a graduated student). I think it contains some GNU functions in drawing.
I appreciate any help and advice.
Thank you in advance.