summaryrefslogtreecommitdiff
path: root/Userland/Demos/Mandelbrot
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-03-12 12:09:29 -0400
committerJelle Raaijmakers <jelle@gmta.nl>2023-03-12 21:32:21 +0100
commitf1a3028ef10db2756fa672668b1cecb7cc2cbee0 (patch)
tree81feaa65cf3359cf8396cc31c2a7be4abe3452da /Userland/Demos/Mandelbrot
parent01387eb72b63e30b6a39249ad819e2ba98e6b82d (diff)
downloadserenity-f1a3028ef10db2756fa672668b1cecb7cc2cbee0.zip
LibGfx: Change BMPWriter API to be consistent with other image writers
Diffstat (limited to 'Userland/Demos/Mandelbrot')
-rw-r--r--Userland/Demos/Mandelbrot/Mandelbrot.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
index c975bbaf9c..405481e1ad 100644
--- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp
+++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
@@ -371,11 +371,9 @@ ErrorOr<void> Mandelbrot::export_image(DeprecatedString const& export_path, Imag
m_set.resize(Gfx::IntSize { 1920, 1080 });
ByteBuffer encoded_data;
switch (image_type) {
- case ImageType::BMP: {
- Gfx::BMPWriter dumper;
- encoded_data = dumper.dump(m_set.bitmap());
+ case ImageType::BMP:
+ encoded_data = TRY(Gfx::BMPWriter::encode(m_set.bitmap()));
break;
- }
case ImageType::PNG:
encoded_data = TRY(Gfx::PNGWriter::encode(m_set.bitmap()));
break;