mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
LibGfx: Move BMP's ColorSpace definition into a BMP namespace
This commit is contained in:
parent
00a1dd2763
commit
50b978fefb
Notes:
github-actions[bot]
2024-12-05 16:18:06 +00:00
Author: https://github.com/LucasChollet
Commit: 50b978fefb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1764
Reviewed-by: https://github.com/trflynn89
1 changed files with 5 additions and 1 deletions
|
@ -91,6 +91,8 @@ struct Formatter<Gfx::Endpoint<T>> : Formatter<StringView> {
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
namespace BMP {
|
||||
|
||||
// CALIBRATED_RGB, sRGB, WINDOWS_COLOR_SPACE values are from
|
||||
// https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/eb4bbd50-b3ce-4917-895c-be31f214797f
|
||||
// PROFILE_LINKED, PROFILE_EMBEDDED values are from
|
||||
|
@ -117,6 +119,8 @@ struct ColorSpace {
|
|||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapv4header
|
||||
struct DIBV4 {
|
||||
u32 color_space { 0 };
|
||||
|
@ -1528,7 +1532,7 @@ ErrorOr<Optional<ReadonlyBytes>> BMPImageDecoderPlugin::icc_data()
|
|||
// FIXME: For LINKED, return data from the linked file?
|
||||
// FIXME: For sRGB and WINDOWS_COLOR_SPACE, return an sRGB profile somehow.
|
||||
// FIXME: For CALIBRATED_RGB, do something with v4.{red_endpoint,green_endpoint,blue_endpoint,gamma_endpoint}
|
||||
if (m_context->dib.v4.color_space != ColorSpace::EMBEDDED)
|
||||
if (m_context->dib.v4.color_space != BMP::ColorSpace::EMBEDDED)
|
||||
return OptionalNone {};
|
||||
|
||||
auto const& v5 = m_context->dib.v5;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue