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#ifndef DT_APPS_ANSEL_CHART_COLORCHART_H
25#define DT_APPS_ANSEL_CHART_COLORCHART_H
26
28#include "math/homography.h" // point_t
29
30#include <glib.h>
31
32typedef struct f_line_t
33{
36
37typedef struct box_t
38{
39 // position
41 float w, h;
42 // color
44 dt_aligned_pixel_t color; // either XYZ or Lab, depending on color_space
45 dt_aligned_pixel_t rgb; // color converted to sRGB for rough displaying of patches
47
48typedef struct chart_t
49{
50 // the F marks
51 GList *f_list;
52 // the two kinds of boxen
53 GHashTable *d_table, *box_table;
54 // the box sets. the data is as follows:
55 // a hash table with a human readable name as key. the values are GList* with the names of patches.
56 // use those to lookup box_table
57 GHashTable *patch_sets;
58 // the bounding box
59 float bb_w, bb_h;
60 // other data from the CHT file
63
64
65void free_chart(chart_t *chart);
66chart_t *parse_cht(const char *filename);
67int parse_it8(const char *filename, chart_t *chart);
69
70#endif // DT_APPS_ANSEL_CHART_COLORCHART_H
71
72// clang-format off
73// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
74// vim: shiftwidth=2 expandtab tabstop=2 cindent
75// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
76// clang-format on
77
chart_t * parse_cht(const char *filename)
Definition colorchart.c:165
void free_chart(chart_t *chart)
Definition colorchart.c:53
int parse_it8(const char *filename, chart_t *chart)
Definition colorchart.c:535
void checker_set_color(box_t *box, dt_colorspaces_color_profile_type_t color_space, float c0, float c1, float c2)
Definition colorchart.c:116
dt_colorspaces_color_profile_type_t color_space
Definition mipmap_cache.c:5
The colour-profile vocabulary, and nothing else.
dt_colorspaces_color_profile_type_t
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
Definition simd.h:53
float h
Definition colorchart.h:41
float w
Definition colorchart.h:41
dt_colorspaces_color_profile_type_t color_space
Definition colorchart.h:43
dt_aligned_pixel_t color
Definition colorchart.h:44
dt_aligned_pixel_t rgb
Definition colorchart.h:45
point_t p
Definition colorchart.h:40
float bb_w
Definition colorchart.h:59
GHashTable * patch_sets
Definition colorchart.h:57
float bb_h
Definition colorchart.h:59
float box_shrink
Definition colorchart.h:61
GHashTable * box_table
Definition colorchart.h:53
GHashTable * d_table
Definition colorchart.h:53
float ref_rotation
Definition colorchart.h:61
GList * f_list
Definition colorchart.h:51
point_t p[4]
Definition colorchart.h:34