refactor OverworldEditor: replace ConvertSurfaceToPNG with GetPngData for clipboard image copying

This commit is contained in:
scawful
2025-01-01 15:53:59 -05:00
parent 4a250a35cb
commit 9164fec53f

View File

@@ -175,8 +175,8 @@ void OverworldEditor::DrawToolset() {
gui::AddTableColumn(toolset_table_, "##Properties", [&]() {
if (Button(ICON_MD_CONTENT_COPY)) {
std::vector<uint8_t> png_data;
if (gfx::ConvertSurfaceToPNG(maps_bmp_[current_map_].surface(),
png_data)) {
png_data = maps_bmp_[current_map_].GetPngData();
if (png_data.size() > 0) {
core::CopyImageToClipboard(png_data);
} else {
status_ = absl::InternalError(