|
1 | 1 | /* |
2 | | - * Copyright (c) 2023, Nico Weber <[email protected]> |
| 2 | + * Copyright (c) 2023-2025, Nico Weber <[email protected]> |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: BSD-2-Clause |
5 | 5 | */ |
|
11 | 11 |
|
12 | 12 | namespace Gfx::ICC { |
13 | 13 |
|
14 | | -static ProfileHeader rgb_header() |
| 14 | +static ProfileHeader profile_header(ColorSpace data_color_space, ColorSpace connection_space) |
15 | 15 | { |
16 | 16 | ProfileHeader header; |
17 | 17 | header.version = Version(4, 0x40); |
18 | 18 | header.device_class = DeviceClass::DisplayDevice; |
19 | | - header.data_color_space = ColorSpace::RGB; |
20 | | - header.connection_space = ColorSpace::PCSXYZ; |
| 19 | + header.data_color_space = data_color_space; |
| 20 | + header.connection_space = connection_space; |
21 | 21 | header.creation_timestamp = MUST(DateTime::from_time_t(0)); |
22 | 22 | header.rendering_intent = RenderingIntent::Perceptual; |
23 | 23 | header.pcs_illuminant = XYZ { 0.9642, 1.0, 0.8249 }; |
@@ -54,7 +54,7 @@ ErrorOr<NonnullRefPtr<Profile>> sRGB() |
54 | 54 | // Explain why, and why this picks the numbers it does. |
55 | 55 | // In the meantime, https://github.com/SerenityOS/serenity/pull/17714 has a few notes. |
56 | 56 |
|
57 | | - auto header = rgb_header(); |
| 57 | + auto header = profile_header(ColorSpace::RGB, ColorSpace::PCSXYZ); |
58 | 58 |
|
59 | 59 | OrderedHashMap<TagSignature, NonnullRefPtr<TagData>> tag_table; |
60 | 60 |
|
|
0 commit comments