dilevin / computer-graphics-csc317

Course Page for Computer Graphics course
130 stars 26 forks source link

A1 output ppm file cannot be opened #2

Closed wufengta closed 5 years ago

wufengta commented 5 years ago

I used open to open the filename, e.g, std::ofstream file; file.open(filename); (code from the internet) and then I used a while loop to go through every element in vector data, and used file << data[i]; to write every element into the file. I also did flush and close to the stream, and there were truly something written into the output ppm file, but the ppm file cannot be opened at all. The size of each ppm file is about 432 kb, while the gray one is 1/3 of the normal size. When I tried to open the ppm file, there is a tip says "load meta information failed". Any ideas?

dilevin commented 5 years ago

Please post problems with the A1 code on the A1 github issues page and ask for help with the assignment on the discussion board.