1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibGfx: Rename 32-bit BitmapFormats to BGRA8888 and BGRx888x

The previous names (RGBA32 and RGB32) were misleading since that's not
the actual byte order in memory. The new names reflect exactly how the
color values get laid out in bitmap data.
This commit is contained in:
Andreas Kling 2021-03-16 11:48:42 +01:00
parent 0bfdf95af6
commit e0f32626bc
31 changed files with 70 additions and 70 deletions

View file

@ -497,7 +497,7 @@ static RefPtr<Gfx::Bitmap> render_thumbnail(const StringView& path)
double scale = min(32 / (double)png_bitmap->width(), 32 / (double)png_bitmap->height());
auto thumbnail = Gfx::Bitmap::create(Gfx::BitmapFormat::RGBA32, { 32, 32 });
auto thumbnail = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, { 32, 32 });
Gfx::IntRect destination = Gfx::IntRect(0, 0, (int)(png_bitmap->width() * scale), (int)(png_bitmap->height() * scale));
destination.center_within(thumbnail->rect());