diff options
Diffstat (limited to 'Userland/Applications/PixelPaint/main.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index df581829e6..9c054a67dd 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -160,6 +160,20 @@ int main(int argc, char** argv) image_editor.image()->export_bmp(save_path.value()); }, window)); + export_submenu.add_action( + GUI::Action::create( + "As PNG", [&](auto&) { + if (!image_editor.image()) + return; + + Optional<String> save_path = GUI::FilePicker::get_save_filepath(window, "untitled", "png"); + + if (!save_path.has_value()) + return; + + image_editor.image()->export_png(save_path.value()); + }, + window)); app_menu.add_separator(); app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { |