Add a function to save a bitmap callable from debugger

This allows to dump a bitmap to a disk file in order to examine it
outside of the debugger when debugging.

Note that at least MSVC and gdb are not smart enough to allow calling
wxBitmap::SaveFile() directly.
This commit is contained in:
Vadim Zeitlin 2023-11-06 22:08:51 +01:00
parent 089bf467a9
commit 2d6817b0a8

View file

@ -25,6 +25,11 @@
#include "wx/mstream.h"
#endif
extern bool wxDumpBitmap(const wxBitmap& bitmap, const char* path)
{
return bitmap.SaveFile(path, wxBITMAP_TYPE_BMP);
}
// ----------------------------------------------------------------------------
// wxVariant support
// ----------------------------------------------------------------------------