Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorchart.h
Go to the documentation of this file.
1
/*
2
* This file is part of darktable,
3
* Copyright (C) 2016 johannes hanika.
4
* Copyright (C) 2016-2017 Tobias Ellinghaus.
5
* Copyright (C) 2020 Aurélien PIERRE.
6
* Copyright (C) 2020 Pascal Obry.
7
* Copyright (C) 2021 Ralf Brown.
8
* Copyright (C) 2022 Martin Bařinka.
9
*
10
* darktable is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
*
15
* darktable is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with darktable. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
24
#pragma once
25
26
#include "
common/colorspaces.h
"
27
#include "
common/colorspaces_inline_conversions.h
"
28
29
#include <glib.h>
30
31
typedef
struct
point_t
32
{
33
float
x
,
y
;
34
}
point_t
;
35
36
typedef
struct
f_line_t
37
{
38
point_t
p
[4];
39
}
f_line_t
;
40
41
typedef
struct
box_t
42
{
43
// position
44
point_t
p
;
45
float
w
,
h
;
46
// color
47
dt_colorspaces_color_profile_type_t
color_space
;
48
dt_aligned_pixel_t
color
;
// either XYZ or Lab, depending on color_space
49
dt_aligned_pixel_t
rgb
;
// color converted to sRGB for rough displaying of patches
50
}
box_t
;
51
52
typedef
struct
chart_t
53
{
54
// the F marks
55
GList *
f_list
;
56
// the two kinds of boxen
57
GHashTable *
d_table
, *
box_table
;
58
// the box sets. the data is as follows:
59
// a hash table with a human readable name as key. the values are GList* with the names of patches.
60
// use those to lookup box_table
61
GHashTable *
patch_sets
;
62
// the bounding box
63
float
bb_w
,
bb_h
;
64
// other data from the CHT file
65
float
box_shrink
,
ref_rotation
;
66
}
chart_t
;
67
68
69
void
free_chart
(
chart_t
*chart);
70
chart_t
*
parse_cht
(
const
char
*filename);
71
int
parse_it8
(
const
char
*filename,
chart_t
*chart);
72
void
checker_set_color
(
box_t
*box,
dt_colorspaces_color_profile_type_t
color_space
,
float
c0,
float
c1
,
float
c2
);
73
74
75
// clang-format off
76
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
77
// vim: shiftwidth=2 expandtab tabstop=2 cindent
78
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
79
// clang-format on
80
point_t
struct point_t point_t
parse_cht
chart_t * parse_cht(const char *filename)
Definition
colorchart.c:155
free_chart
void free_chart(chart_t *chart)
Definition
colorchart.c:50
parse_it8
int parse_it8(const char *filename, chart_t *chart)
Definition
colorchart.c:525
checker_set_color
void checker_set_color(box_t *box, dt_colorspaces_color_profile_type_t color_space, float c0, float c1, float c2)
Definition
colorchart.c:113
colorspaces.h
dt_colorspaces_color_profile_type_t
dt_colorspaces_color_profile_type_t
Definition
colorspaces.h:81
colorspaces_inline_conversions.h
color_space
dt_colorspaces_color_profile_type_t color_space
Definition
mipmap_cache.c:5
dt_aligned_pixel_t
float dt_aligned_pixel_t[4]
Definition
noiseprofile.c:28
box_t
Definition
colorchart.h:42
box_t::h
float h
Definition
colorchart.h:45
box_t::w
float w
Definition
colorchart.h:45
box_t::color_space
dt_colorspaces_color_profile_type_t color_space
Definition
colorchart.h:47
box_t::color
dt_aligned_pixel_t color
Definition
colorchart.h:48
box_t::rgb
dt_aligned_pixel_t rgb
Definition
colorchart.h:49
box_t::p
point_t p
Definition
colorchart.h:44
chart_t
Definition
colorchart.h:53
chart_t::bb_w
float bb_w
Definition
colorchart.h:63
chart_t::patch_sets
GHashTable * patch_sets
Definition
colorchart.h:61
chart_t::bb_h
float bb_h
Definition
colorchart.h:63
chart_t::box_shrink
float box_shrink
Definition
colorchart.h:65
chart_t::box_table
GHashTable * box_table
Definition
colorchart.h:57
chart_t::d_table
GHashTable * d_table
Definition
colorchart.h:57
chart_t::ref_rotation
float ref_rotation
Definition
colorchart.h:65
chart_t::f_list
GList * f_list
Definition
colorchart.h:55
f_line_t
Definition
colorchart.h:37
f_line_t::p
point_t p[4]
Definition
colorchart.h:38
point_t
Definition
colorchart.h:32
point_t::y
float y
Definition
colorchart.h:33
point_t::x
float x
Definition
colorchart.h:33
c2
#define c2
Definition
colorspaces_inline_conversions.h:796
c1
#define c1
Definition
colorspaces_inline_conversions.h:795
src
chart
colorchart.h
Generated by
1.9.8