Flutter Engine
The Flutter Engine
SkICC.h
Go to the documentation of this file.
1/*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkICC_DEFINED
9#define SkICC_DEFINED
10
13
14#include <cstdint>
15
16class SkData;
17struct skcms_ICCProfile;
18struct skcms_Matrix3x3;
20
22 const skcms_Matrix3x3& toXYZD50);
23
24SK_API sk_sp<SkData> SkWriteICCProfile(const skcms_ICCProfile*, const char* description);
25
26// Utility function for populating the grid_16 member of skcms_A2B and skcms_B2A
27// structures. This converts a point in XYZD50 to its representation in grid_16_lab.
28// It will write 6 bytes. The behavior of this function matches how skcms will decode
29// values, but might not match the specification, see https://crbug.com/skia/13807.
30SK_API void SkICCFloatXYZD50ToGrid16Lab(const float* float_xyz, uint8_t* grid16_lab);
31
32// Utility function for popluating the table_16 member of skcms_Curve structure.
33// This converts a float to its representation in table_16. It will write 2 bytes.
34SK_API void SkICCFloatToTable16(const float f, uint8_t* table_16);
35
36#endif//SkICC_DEFINED
#define SK_API
Definition: SkAPI.h:35
SK_API void SkICCFloatToTable16(const float f, uint8_t *table_16)
SK_API void SkICCFloatXYZD50ToGrid16Lab(const float *float_xyz, uint8_t *grid16_lab)
SK_API sk_sp< SkData > SkWriteICCProfile(const skcms_TransferFunction &, const skcms_Matrix3x3 &toXYZD50)
Definition: SkICC.cpp:682
Definition: SkData.h:25