| 675 | |
| 676 | template <int C, int H, int W> |
| 677 | void readPPMFile(const std::string& filename, samplesCommon::PPM<C, H, W>& ppm) |
| 678 | { |
| 679 | ppm.fileName = filename; |
| 680 | std::ifstream infile(filename, std::ifstream::binary); |
| 681 | assert(infile.is_open() && "Attempting to read from a file that is not open."); |
| 682 | infile >> ppm.magic >> ppm.w >> ppm.h >> ppm.max; |
| 683 | infile.seekg(1, infile.cur); |
| 684 | infile.read(reinterpret_cast<char*>(ppm.buffer), ppm.w * ppm.h * 3); |
| 685 | } |
| 686 | |
| 687 | inline void readPPMFile(const std::string& filename, vPPM& ppm, std::vector<std::string>& input_dir) |
| 688 | { |
no test coverage detected