| 4070 | #define STB_IMAGE_WRITE_IMPLEMENTATION |
| 4071 | #include "../stb/stb_image_write.h" |
| 4072 | static void ImFontAtlasDebugWriteTexToDisk(ImTextureData* tex, const char* description) |
| 4073 | { |
| 4074 | ImGuiContext& g = *GImGui; |
| 4075 | char buf[128]; |
| 4076 | ImFormatString(buf, IM_COUNTOF(buf), "[%05d] Texture #%03d - %s.png", g.FrameCount, tex->UniqueID, description); |
| 4077 | stbi_write_png(buf, tex->Width, tex->Height, tex->BytesPerPixel, tex->Pixels, tex->GetPitch()); // tex->BytesPerPixel is technically not component, but ok for the formats we support. |
| 4078 | } |
| 4079 | #endif |
| 4080 | |
| 4081 | void ImFontAtlasTextureRepack(ImFontAtlas* atlas, int w, int h) |
nothing calls this directly
no test coverage detected