MCPcopy Create free account
hub / github.com/beefytech/Beef / Res_WritePNG

Function Res_WritePNG

BeefySysLib/ResLib.cpp:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170BF_EXPORT bool BF_CALLTYPE Res_WritePNG(uint32* bits, int width, int height, const char* filePath)
171{
172 String& outString = *gResLib_TLStrReturn.Get();
173 PNGData pngData;
174 pngData.mBits = bits;
175 pngData.mWidth = width;
176 pngData.mHeight = height;
177 bool result = pngData.WriteToFile(filePath);
178 pngData.mBits = NULL;
179 outString.Clear();
180 outString.Insert(0, (char*)pngData.mSrcData, pngData.mSrcDataLen);
181 return result;
182}

Callers

nothing calls this directly

Calls 4

GetMethod · 0.45
WriteToFileMethod · 0.45
ClearMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected