Tell me, please, how to read a GIF file byte-by-bye. C ++ language
- 7just like any other binary file. - KoVadim
- Do you mean bytes, or do you want to see the gif structure or the gif decompressor sources? - nick_n_a
|
1 answer
Since the question has a C++
tag, I will propose a solution in the C++
style.
#include <fstream> #include <vector> #include <iterator> std::ifstream input_stream("input.gif", std::ios::binary); std::vector<char> buffer((std::istreambuf_iterator<char>(input_stream)), std::istreambuf_iterator<char>());
Upon completion, buffer
will contain your input.gif
file.
|