1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +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

@ -1186,12 +1186,12 @@ static bool decode_bmp_pixel_data(BMPLoadingContext& context)
return BitmapFormat::Indexed8;
case 16:
if (context.dib.info.masks.size() == 4)
return BitmapFormat::RGBA32;
return BitmapFormat::RGB32;
return BitmapFormat::BGRA8888;
return BitmapFormat::BGRx8888;
case 24:
return BitmapFormat::RGB32;
return BitmapFormat::BGRx8888;
case 32:
return BitmapFormat::RGBA32;
return BitmapFormat::BGRA8888;
default:
return BitmapFormat::Invalid;
}