MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / saveAsPNG

Method saveAsPNG

bitmap/NewBitmap.cpp:51–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool NewBitmap::saveAsPNG(const char *filePath) {
52 // TODO: Support more formats? stb_write supports at least RGB and RGBA
53 ASSERT(_format == PixelDataFormat::RGBA32);
54
55 stbi_flip_vertically_on_write(_flippedY);
56 return stbi_write_png(filePath, _w, _h, getNumComponents(), _data.get(), getStride()) == 0;
57}

Callers 1

DoScreenshotFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected