diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-07-04 12:34:10 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-05 00:43:00 +0200 |
commit | 2183d01eb0c2ee9fd5db9af33b4f201586e5cd30 (patch) | |
tree | bfbe10e6cc9afc0ae530d3489d8e8ff6087e0c3d /Userland/Applications/PixelPaint/Image.h | |
parent | 8324ffefe707c83ce8a952d779d33edcc38d24fe (diff) | |
download | serenity-2183d01eb0c2ee9fd5db9af33b4f201586e5cd30.zip |
PixelPaint: Ask to preserve transparency when exporting
Previously the alpha channel was thrown away when exporting to BMP or
PNG in PixelPaint, instead let the user decide.
Diffstat (limited to 'Userland/Applications/PixelPaint/Image.h')
-rw-r--r-- | Userland/Applications/PixelPaint/Image.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/PixelPaint/Image.h b/Userland/Applications/PixelPaint/Image.h index a5474a6958..65aad4726b 100644 --- a/Userland/Applications/PixelPaint/Image.h +++ b/Userland/Applications/PixelPaint/Image.h @@ -43,7 +43,7 @@ public: static RefPtr<Image> try_create_from_bitmap(NonnullRefPtr<Gfx::Bitmap>); // This generates a new Bitmap with the final image (all layers composed according to their attributes.) - RefPtr<Gfx::Bitmap> try_compose_bitmap() const; + RefPtr<Gfx::Bitmap> try_compose_bitmap(Gfx::BitmapFormat format) const; size_t layer_count() const { return m_layers.size(); } Layer const& layer(size_t index) const { return m_layers.at(index); } @@ -58,8 +58,8 @@ public: void paint_into(GUI::Painter&, Gfx::IntRect const& dest_rect) const; Result<void, String> write_to_file(String const& file_path) const; - Result<void, String> export_bmp_to_file(String const& file_path); - Result<void, String> export_png_to_file(String const& file_path); + Result<void, String> export_bmp_to_file(String const& file_path, bool preserve_alpha_channel); + Result<void, String> export_png_to_file(String const& file_path, bool preserve_alpha_channel); void move_layer_to_front(Layer&); void move_layer_to_back(Layer&); |