File: SkICC.h

package info (click to toggle)
webkit2gtk 2.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 429,764 kB
  • sloc: cpp: 3,697,587; javascript: 194,444; ansic: 169,997; python: 46,499; asm: 19,295; ruby: 18,528; perl: 16,602; xml: 4,650; yacc: 2,360; sh: 2,098; java: 1,993; lex: 1,327; pascal: 366; makefile: 298
file content (36 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download | duplicates (31)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkICC_DEFINED
#define SkICC_DEFINED

#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

#include <cstdint>

class SkData;
struct skcms_ICCProfile;
struct skcms_Matrix3x3;
struct skcms_TransferFunction;

SK_API sk_sp<SkData> SkWriteICCProfile(const skcms_TransferFunction&,
                                       const skcms_Matrix3x3& toXYZD50);

SK_API sk_sp<SkData> SkWriteICCProfile(const skcms_ICCProfile*, const char* description);

// Utility function for populating the grid_16 member of skcms_A2B and skcms_B2A
// structures. This converts a point in XYZD50 to its representation in grid_16_lab.
// It will write 6 bytes. The behavior of this function matches how skcms will decode
// values, but might not match the specification, see https://crbug.com/skia/13807.
SK_API void SkICCFloatXYZD50ToGrid16Lab(const float* float_xyz, uint8_t* grid16_lab);

// Utility function for popluating the table_16 member of skcms_Curve structure.
// This converts a float to its representation in table_16. It will write 2 bytes.
SK_API void SkICCFloatToTable16(const float f, uint8_t* table_16);

#endif//SkICC_DEFINED