mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 16:45:08 +00:00

This might be useful for converting data from arbitrary profiles to sRGB. For now, this only encodes the transfer function and puts in zero values for chromaticities, whitepoint, and chromatic adaptation matrix. This makes the profile unusable for now. But I've spent a very long time reading things and need to check in some code, and it's some progress. The encoded transfer function exactly matches the one in GIMP's built-in sRGB ICC profile (but not the Compact-ICC-Profiles v4 one or the RawTherapee v4 one -- I'll add a comment about why later.)
18 lines
256 B
C++
18 lines
256 B
C++
/*
|
|
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <AK/NonnullRefPtr.h>
|
|
|
|
namespace Gfx::ICC {
|
|
|
|
class Profile;
|
|
|
|
ErrorOr<NonnullRefPtr<Profile>> sRGB();
|
|
|
|
}
|