diff --git a/Userland/Libraries/LibGfx/ImageFormats/ExifOrientedBitmap.h b/Userland/Libraries/LibGfx/ImageFormats/ExifOrientedBitmap.h index c80b926829..9b21956ea1 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/ExifOrientedBitmap.h +++ b/Userland/Libraries/LibGfx/ImageFormats/ExifOrientedBitmap.h @@ -14,7 +14,7 @@ namespace Gfx { class ExifOrientedBitmap { public: template - static ErrorOr create(BitmapFormat format, IntSize size, TIFF::Orientation orientation) + static ErrorOr create(TIFF::Orientation orientation, IntSize size, BitmapFormat format) { auto bitmap = TRY(Bitmap::create(format, oriented_size(size, orientation))); return ExifOrientedBitmap(move(bitmap), size, orientation); diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGXLLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGXLLoader.cpp index 655d464432..d79a7c21de 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGXLLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGXLLoader.cpp @@ -1719,7 +1719,7 @@ public: auto const height = m_channels[0].height(); auto const orientation = static_cast(metadata.orientation); - auto oriented_bitmap = TRY(ExifOrientedBitmap::create(BitmapFormat::BGRA8888, { width, height }, orientation)); + auto oriented_bitmap = TRY(ExifOrientedBitmap::create(orientation, { width, height }, BitmapFormat::BGRA8888)); auto const alpha_channel = metadata.alpha_channel(); diff --git a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp index 2a81897245..37ae162c4f 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp @@ -243,7 +243,7 @@ private: auto const strip_byte_counts = *m_metadata.strip_byte_counts(); auto const rows_per_strip = m_metadata.rows_per_strip().value_or(*m_metadata.image_height()); - auto oriented_bitmap = TRY(ExifOrientedBitmap::create(BitmapFormat::BGRA8888, { *metadata().image_width(), *metadata().image_height() }, *metadata().orientation())); + auto oriented_bitmap = TRY(ExifOrientedBitmap::create(*metadata().orientation(), { *metadata().image_width(), *metadata().image_height() }, BitmapFormat::BGRA8888)); for (u32 strip_index = 0; strip_index < strips_offset.size(); ++strip_index) { TRY(m_stream->seek(strips_offset[strip_index]));