onilink_

Untitled

Jul 14th, 2023
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1.     std::vector<uint8_t> buffer(wid * hei * 4);
  2.     for(unsigned y=0; y<hei; ++y) {
  3.         char* imptr = reinterpret_cast<char*>(&buffer[y * 4 * wid]);
  4.         file.read(imptr, wid*4);
  5.     }
Advertisement
Add Comment
Please, Sign In to add comment