| 37 | } |
| 38 | |
| 39 | void SaveImagePNG(const LLGL::Image& img, const std::string& filename, std::uint32_t slice = 0) |
| 40 | { |
| 41 | int w = static_cast<int>(img.GetExtent().width); |
| 42 | int h = static_cast<int>(img.GetExtent().height); |
| 43 | int comp = static_cast<int>(LLGL::ImageFormatSize(img.GetFormat())); |
| 44 | auto buf = reinterpret_cast<const char*>(img.GetData()) + img.GetDepthStride() * slice; |
| 45 | |
| 46 | stbi_write_png(filename.c_str(), w, h, comp, buf, img.GetRowStride()); |
| 47 | } |
| 48 | |
| 49 | void Test_PixelOperations() |
| 50 | { |
no test coverage detected