diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index ced7b2a351..6597fc3d91 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -31,7 +31,7 @@ TEST_CASE(test_bmp) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("rgba32-1.bmp"sv))); - EXPECT(MUST(Gfx::BMPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::BMPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::BMPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -46,7 +46,7 @@ TEST_CASE(test_bmp) TEST_CASE(test_gif) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("download-animation.gif"sv))); - EXPECT(MUST(Gfx::GIFImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::GIFImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::GIFImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -61,7 +61,7 @@ TEST_CASE(test_gif) TEST_CASE(test_not_ico) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie.png"sv))); - EXPECT(!MUST(Gfx::ICOImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(!Gfx::ICOImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::ICOImageDecoderPlugin::create(file->bytes())); EXPECT(!plugin_decoder->initialize()); @@ -75,7 +75,7 @@ TEST_CASE(test_not_ico) TEST_CASE(test_bmp_embedded_in_ico) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("serenity.ico"sv))); - EXPECT(MUST(Gfx::ICOImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::ICOImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::ICOImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -89,7 +89,7 @@ TEST_CASE(test_bmp_embedded_in_ico) TEST_CASE(test_jpg) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("rgb24.jpg"sv))); - EXPECT(MUST(Gfx::JPEGImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::JPEGImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::JPEGImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -104,7 +104,7 @@ TEST_CASE(test_jpg) TEST_CASE(test_pbm) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie-raw.pbm"sv))); - EXPECT(MUST(Gfx::PBMImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::PBMImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::PBMImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -119,7 +119,7 @@ TEST_CASE(test_pbm) TEST_CASE(test_pgm) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie-raw.pgm"sv))); - EXPECT(MUST(Gfx::PGMImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::PGMImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::PGMImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -134,7 +134,7 @@ TEST_CASE(test_pgm) TEST_CASE(test_png) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie.png"sv))); - EXPECT(MUST(Gfx::PNGImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::PNGImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::PNGImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -149,7 +149,7 @@ TEST_CASE(test_png) TEST_CASE(test_ppm) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie-raw.ppm"sv))); - EXPECT(MUST(Gfx::PPMImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::PPMImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::PPMImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -224,7 +224,7 @@ TEST_CASE(test_targa_top_left_compressed) TEST_CASE(test_webp_simple_lossy) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("simple-vp8.webp"sv))); - EXPECT(MUST(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -238,7 +238,7 @@ TEST_CASE(test_webp_simple_lossy) TEST_CASE(test_webp_simple_lossless) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("simple-vp8l.webp"sv))); - EXPECT(MUST(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -252,7 +252,7 @@ TEST_CASE(test_webp_simple_lossless) TEST_CASE(test_webp_extended_lossy) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("extended-lossy.webp"sv))); - EXPECT(MUST(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -266,7 +266,7 @@ TEST_CASE(test_webp_extended_lossy) TEST_CASE(test_webp_extended_lossless) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("extended-lossless.webp"sv))); - EXPECT(MUST(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); @@ -280,7 +280,7 @@ TEST_CASE(test_webp_extended_lossless) TEST_CASE(test_webp_extended_lossless_animated) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("extended-lossless-animated.webp"sv))); - EXPECT(MUST(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()))); + EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes())); auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes())); EXPECT(plugin_decoder->initialize()); diff --git a/Userland/Libraries/LibGUI/FileIconProvider.cpp b/Userland/Libraries/LibGUI/FileIconProvider.cpp index d0f603ac75..0b58a83b13 100644 --- a/Userland/Libraries/LibGUI/FileIconProvider.cpp +++ b/Userland/Libraries/LibGUI/FileIconProvider.cpp @@ -210,7 +210,7 @@ Icon FileIconProvider::icon_for_executable(DeprecatedString const& path) bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size); } else { // FIXME: Use the ImageDecoder service. - if (Gfx::PNGImageDecoderPlugin::sniff({ section->raw_data(), section->size() }).release_value_but_fixme_should_propagate_errors()) { + if (Gfx::PNGImageDecoderPlugin::sniff({ section->raw_data(), section->size() })) { auto png_decoder = Gfx::PNGImageDecoderPlugin::create({ section->raw_data(), section->size() }).release_value_but_fixme_should_propagate_errors(); if (png_decoder->initialize()) { auto frame_or_error = png_decoder->frame(0); diff --git a/Userland/Libraries/LibGfx/BMPLoader.cpp b/Userland/Libraries/LibGfx/BMPLoader.cpp index ba2d4cd444..7abfffad81 100644 --- a/Userland/Libraries/LibGfx/BMPLoader.cpp +++ b/Userland/Libraries/LibGfx/BMPLoader.cpp @@ -1505,7 +1505,7 @@ bool BMPImageDecoderPlugin::initialize() return !decode_bmp_header(*m_context).is_error(); } -ErrorOr BMPImageDecoderPlugin::sniff(ReadonlyBytes data) +bool BMPImageDecoderPlugin::sniff(ReadonlyBytes data) { BMPLoadingContext context; context.file_bytes = data.data(); diff --git a/Userland/Libraries/LibGfx/BMPLoader.h b/Userland/Libraries/LibGfx/BMPLoader.h index 0880cf9112..6430d66f94 100644 --- a/Userland/Libraries/LibGfx/BMPLoader.h +++ b/Userland/Libraries/LibGfx/BMPLoader.h @@ -16,7 +16,7 @@ class ICOImageDecoderPlugin; class BMPImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); static ErrorOr> create_as_included_in_ico(Badge, ReadonlyBytes); diff --git a/Userland/Libraries/LibGfx/DDSLoader.cpp b/Userland/Libraries/LibGfx/DDSLoader.cpp index cd52d8d615..f2775dbfee 100644 --- a/Userland/Libraries/LibGfx/DDSLoader.cpp +++ b/Userland/Libraries/LibGfx/DDSLoader.cpp @@ -656,7 +656,7 @@ bool DDSImageDecoderPlugin::initialize() && m_context->data[3] == 0x20; } -ErrorOr DDSImageDecoderPlugin::sniff(ReadonlyBytes data) +bool DDSImageDecoderPlugin::sniff(ReadonlyBytes data) { // The header is always at least 128 bytes, so if the file is smaller, it can't be a DDS. return data.size() > 128 diff --git a/Userland/Libraries/LibGfx/DDSLoader.h b/Userland/Libraries/LibGfx/DDSLoader.h index 21f79bbec2..bc9c6e250f 100644 --- a/Userland/Libraries/LibGfx/DDSLoader.h +++ b/Userland/Libraries/LibGfx/DDSLoader.h @@ -235,7 +235,7 @@ struct DDSLoadingContext; class DDSImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~DDSImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibGfx/GIFLoader.cpp b/Userland/Libraries/LibGfx/GIFLoader.cpp index d952d05ed7..215d5d1d3d 100644 --- a/Userland/Libraries/LibGfx/GIFLoader.cpp +++ b/Userland/Libraries/LibGfx/GIFLoader.cpp @@ -569,7 +569,7 @@ bool GIFImageDecoderPlugin::initialize() return !decode_gif_header(stream).is_error(); } -ErrorOr GIFImageDecoderPlugin::sniff(ReadonlyBytes data) +bool GIFImageDecoderPlugin::sniff(ReadonlyBytes data) { FixedMemoryStream stream { data }; return !decode_gif_header(stream).is_error(); diff --git a/Userland/Libraries/LibGfx/GIFLoader.h b/Userland/Libraries/LibGfx/GIFLoader.h index 0492945f20..deaa011bea 100644 --- a/Userland/Libraries/LibGfx/GIFLoader.h +++ b/Userland/Libraries/LibGfx/GIFLoader.h @@ -15,7 +15,7 @@ struct GIFLoadingContext; class GIFImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~GIFImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibGfx/ICOLoader.cpp b/Userland/Libraries/LibGfx/ICOLoader.cpp index fb6b25baa2..d26a693c2a 100644 --- a/Userland/Libraries/LibGfx/ICOLoader.cpp +++ b/Userland/Libraries/LibGfx/ICOLoader.cpp @@ -149,7 +149,7 @@ ErrorOr ICOImageDecoderPlugin::load_ico_bitmap(ICOLoadingContext& context, return Error::from_string_literal("Index out of bounds"); ICOImageDescriptor& desc = context.images[real_index]; - if (TRY(PNGImageDecoderPlugin::sniff({ context.data + desc.offset, desc.size }))) { + if (PNGImageDecoderPlugin::sniff({ context.data + desc.offset, desc.size })) { auto png_decoder = TRY(PNGImageDecoderPlugin::create({ context.data + desc.offset, desc.size })); if (png_decoder->initialize()) { auto decoded_png_frame = TRY(png_decoder->frame(0)); @@ -181,7 +181,7 @@ ErrorOr ICOImageDecoderPlugin::load_ico_bitmap(ICOLoadingContext& context, } } -ErrorOr ICOImageDecoderPlugin::sniff(ReadonlyBytes data) +bool ICOImageDecoderPlugin::sniff(ReadonlyBytes data) { FixedMemoryStream stream { data }; return !decode_ico_header(stream).is_error(); diff --git a/Userland/Libraries/LibGfx/ICOLoader.h b/Userland/Libraries/LibGfx/ICOLoader.h index 8d7f1713f1..eecd7d396b 100644 --- a/Userland/Libraries/LibGfx/ICOLoader.h +++ b/Userland/Libraries/LibGfx/ICOLoader.h @@ -14,7 +14,7 @@ struct ICOLoadingContext; class ICOImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~ICOImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibGfx/ImageDecoder.cpp b/Userland/Libraries/LibGfx/ImageDecoder.cpp index 3a404d44d3..19c96d9f83 100644 --- a/Userland/Libraries/LibGfx/ImageDecoder.cpp +++ b/Userland/Libraries/LibGfx/ImageDecoder.cpp @@ -22,7 +22,7 @@ namespace Gfx { struct ImagePluginInitializer { - ErrorOr (*sniff)(ReadonlyBytes) = nullptr; + bool (*sniff)(ReadonlyBytes) = nullptr; ErrorOr> (*create)(ReadonlyBytes) = nullptr; }; @@ -53,7 +53,7 @@ static constexpr ImagePluginWithMIMETypeInitializer s_initializers_with_mime_typ static OwnPtr probe_and_sniff_for_appropriate_plugin(ReadonlyBytes bytes) { for (auto& plugin : s_initializers) { - auto sniff_result = plugin.sniff(bytes).release_value_but_fixme_should_propagate_errors(); + auto sniff_result = plugin.sniff(bytes); if (!sniff_result) continue; auto plugin_decoder = plugin.create(bytes).release_value_but_fixme_should_propagate_errors(); diff --git a/Userland/Libraries/LibGfx/JPEGLoader.cpp b/Userland/Libraries/LibGfx/JPEGLoader.cpp index 74ff397d13..14084ab5d8 100644 --- a/Userland/Libraries/LibGfx/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/JPEGLoader.cpp @@ -1363,7 +1363,7 @@ bool JPEGImageDecoderPlugin::initialize() return true; } -ErrorOr JPEGImageDecoderPlugin::sniff(ReadonlyBytes data) +bool JPEGImageDecoderPlugin::sniff(ReadonlyBytes data) { return data.size() > 3 && data.data()[0] == 0xFF diff --git a/Userland/Libraries/LibGfx/JPEGLoader.h b/Userland/Libraries/LibGfx/JPEGLoader.h index 146d51e52e..fd2c30ce5d 100644 --- a/Userland/Libraries/LibGfx/JPEGLoader.h +++ b/Userland/Libraries/LibGfx/JPEGLoader.h @@ -16,7 +16,7 @@ struct JPEGLoadingContext; class JPEGImageDecoderPlugin : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~JPEGImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibGfx/PNGLoader.cpp b/Userland/Libraries/LibGfx/PNGLoader.cpp index 2578eae7ef..26a00a5908 100644 --- a/Userland/Libraries/LibGfx/PNGLoader.cpp +++ b/Userland/Libraries/LibGfx/PNGLoader.cpp @@ -1034,7 +1034,7 @@ bool PNGImageDecoderPlugin::initialize() return decode_png_header(*m_context); } -ErrorOr PNGImageDecoderPlugin::sniff(ReadonlyBytes data) +bool PNGImageDecoderPlugin::sniff(ReadonlyBytes data) { PNGLoadingContext context; context.data = data.data(); diff --git a/Userland/Libraries/LibGfx/PNGLoader.h b/Userland/Libraries/LibGfx/PNGLoader.h index 5d04e6a951..80abda9daf 100644 --- a/Userland/Libraries/LibGfx/PNGLoader.h +++ b/Userland/Libraries/LibGfx/PNGLoader.h @@ -14,7 +14,7 @@ struct PNGLoadingContext; class PNGImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~PNGImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibGfx/PortableImageMapLoader.h b/Userland/Libraries/LibGfx/PortableImageMapLoader.h index 105accc6b2..e6be567dac 100644 --- a/Userland/Libraries/LibGfx/PortableImageMapLoader.h +++ b/Userland/Libraries/LibGfx/PortableImageMapLoader.h @@ -49,7 +49,7 @@ struct PortableImageMapLoadingContext { template class PortableImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); PortableImageDecoderPlugin(u8 const*, size_t); @@ -133,7 +133,7 @@ ErrorOr> PortableImageDecoderPlugin: } template -ErrorOr PortableImageDecoderPlugin::sniff(ReadonlyBytes data) +bool PortableImageDecoderPlugin::sniff(ReadonlyBytes data) { using Context = TContext; if (data.size() < 2) diff --git a/Userland/Libraries/LibGfx/QOILoader.cpp b/Userland/Libraries/LibGfx/QOILoader.cpp index bddf442cd3..ad6a20c78b 100644 --- a/Userland/Libraries/LibGfx/QOILoader.cpp +++ b/Userland/Libraries/LibGfx/QOILoader.cpp @@ -200,7 +200,7 @@ bool QOIImageDecoderPlugin::initialize() return !decode_header_and_update_context(*m_context->stream).is_error(); } -ErrorOr QOIImageDecoderPlugin::sniff(ReadonlyBytes data) +bool QOIImageDecoderPlugin::sniff(ReadonlyBytes data) { FixedMemoryStream stream { { data.data(), data.size() } }; return !decode_qoi_header(stream).is_error(); diff --git a/Userland/Libraries/LibGfx/QOILoader.h b/Userland/Libraries/LibGfx/QOILoader.h index e6555bdfe8..65fa373864 100644 --- a/Userland/Libraries/LibGfx/QOILoader.h +++ b/Userland/Libraries/LibGfx/QOILoader.h @@ -38,7 +38,7 @@ struct QOILoadingContext { class QOIImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~QOIImageDecoderPlugin() override = default; diff --git a/Userland/Libraries/LibGfx/WebPLoader.cpp b/Userland/Libraries/LibGfx/WebPLoader.cpp index c1ed838fa0..d7a288d2fd 100644 --- a/Userland/Libraries/LibGfx/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/WebPLoader.cpp @@ -522,7 +522,7 @@ bool WebPImageDecoderPlugin::initialize() return !decode_webp_header(*m_context).is_error(); } -ErrorOr WebPImageDecoderPlugin::sniff(ReadonlyBytes data) +bool WebPImageDecoderPlugin::sniff(ReadonlyBytes data) { WebPLoadingContext context; context.data = data; diff --git a/Userland/Libraries/LibGfx/WebPLoader.h b/Userland/Libraries/LibGfx/WebPLoader.h index 8352093f1a..ddc82bd0f8 100644 --- a/Userland/Libraries/LibGfx/WebPLoader.h +++ b/Userland/Libraries/LibGfx/WebPLoader.h @@ -14,7 +14,7 @@ struct WebPLoadingContext; class WebPImageDecoderPlugin final : public ImageDecoderPlugin { public: - static ErrorOr sniff(ReadonlyBytes); + static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~WebPImageDecoderPlugin() override; diff --git a/Userland/Libraries/LibPDF/Filter.cpp b/Userland/Libraries/LibPDF/Filter.cpp index b250101dd1..051fd445e7 100644 --- a/Userland/Libraries/LibPDF/Filter.cpp +++ b/Userland/Libraries/LibPDF/Filter.cpp @@ -269,7 +269,7 @@ ErrorOr Filter::decode_jbig2(ReadonlyBytes) ErrorOr Filter::decode_dct(ReadonlyBytes bytes) { - if (Gfx::JPEGImageDecoderPlugin::sniff({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors()) { + if (Gfx::JPEGImageDecoderPlugin::sniff({ bytes.data(), bytes.size() })) { auto decoder = Gfx::JPEGImageDecoderPlugin::create({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors(); if (decoder->initialize()) { auto frame = TRY(decoder->frame(0)); diff --git a/Userland/Services/SpiceAgent/SpiceAgent.cpp b/Userland/Services/SpiceAgent/SpiceAgent.cpp index 417962901a..35869eb9f3 100644 --- a/Userland/Services/SpiceAgent/SpiceAgent.cpp +++ b/Userland/Services/SpiceAgent/SpiceAgent.cpp @@ -142,19 +142,19 @@ void SpiceAgent::on_message_received() } else { ErrorOr frame_or_error = Gfx::ImageFrameDescriptor {}; if (type == ClipboardType::PNG) { - if (Gfx::PNGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) { + if (Gfx::PNGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() })) { auto png_decoder = Gfx::PNGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors(); if (png_decoder->initialize()) frame_or_error = png_decoder->frame(0); } } else if (type == ClipboardType::BMP) { - if (Gfx::BMPImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) { + if (Gfx::BMPImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() })) { auto bmp_decoder = Gfx::BMPImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors(); if (bmp_decoder->initialize()) frame_or_error = bmp_decoder->frame(0); } } else if (type == ClipboardType::JPEG) { - if (Gfx::JPEGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) { + if (Gfx::JPEGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() })) { auto jpeg_decoder = Gfx::JPEGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors(); if (jpeg_decoder->initialize()) frame_or_error = jpeg_decoder->frame(0);