Scribus
Open source desktop publishing at your fingertips
sccolormgmtstructs.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 #ifndef SCCOLORMGMTSTRUCTS_H
9 #define SCCOLORMGMTSTRUCTS_H
10 
11 #include <QString>
12 
13 // If you change that enum do not forget to update functions
14 // colorFormatType() and colorFormatHasAlpha()
15 typedef enum
16 {
17  Format_Undefined,
18  Format_RGB_8,
19  Format_RGB_16,
20  Format_RGBA_8,
21  Format_RGBA_16,
22  Format_ARGB_8,
23  Format_ARGB_16,
24  Format_BGRA_8,
25  Format_BGRA_16,
26  Format_CMYK_8,
27  Format_CMYK_16,
28  Format_CMYKA_8,
29  Format_CMYKA_16,
30  Format_YMCK_8,
31  Format_YMCK_16,
32  Format_GRAY_8,
33  Format_GRAY_16,
34  Format_LabA_8,
35  Format_Lab_Dbl
36 } eColorFormat;
37 
38 typedef enum
39 {
40  Color_Unknown,
41  Color_RGB,
42  Color_CMYK,
43  Color_Gray,
44  Color_Lab
45 } eColorType;
46 
47 typedef enum
48 {
49  Ctf_BlackPointCompensation = 1,
50  Ctf_BlackPreservation = 2,
51  Ctf_Softproofing = 4,
52  Ctf_GamutCheck = 8
53 } eColorTransformFlags;
54 
55 typedef enum
56 {
57  Intent_Perceptual = 0,
58  Intent_Relative_Colorimetric = 1,
59  Intent_Saturation = 2,
60  Intent_Absolute_Colorimetric = 3,
61  Intent_Max = 4
62 } eRenderIntent;
63 
64 typedef enum
65 {
66  ColorSpace_Unknown,
67  ColorSpace_XYZ,
68  ColorSpace_Lab,
69  ColorSpace_Luv,
70  ColorSpace_YCbCr,
71  ColorSpace_Yxy,
72  ColorSpace_Rgb,
73  ColorSpace_Gray,
74  ColorSpace_Hsv,
75  ColorSpace_Hls,
76  ColorSpace_Cmyk,
77  ColorSpace_Cmy
78 } eColorSpaceType;
79 
80 typedef enum
81 {
82  Class_Unknown,
83  Class_Input,
84  Class_Display,
85  Class_Output,
86  Class_Link,
87  Class_Abstract,
88  Class_ColorSpace,
89  Class_NamedColor
90 } eProfileClass;
91 
93 {
94 public:
95  bool useBlackPointCompensation;
96  bool useBlackPreservation;
97 
99  {
100  useBlackPointCompensation = true;
101  useBlackPreservation = false;
102  }
103 };
104 
105 typedef struct
106 {
107  QString file;
108  QString description;
109  eColorSpaceType colorSpace;
110  eProfileClass deviceClass;
111  QString debug;
113 
114 typedef struct
115 {
116  QString inputProfile;
117  QString outputProfile;
118  QString proofingProfile;
119  eColorFormat inputFormat;
120  eColorFormat outputFormat;
121  eRenderIntent renderIntent;
122  eRenderIntent proofingIntent;
123  long flags;
125 
126 bool operator==(const ScColorTransformInfo& v1, const ScColorTransformInfo& v2);
127 
128 eColorType colorFormatType(eColorFormat format);
129 uint colorFormatNumChannels(eColorFormat format);
130 uint colorFormatBytesPerChannel(eColorFormat format);
131 bool colorFormatHasAlpha(eColorFormat format);
132 
133 #endif
Definition: sccolormgmtstructs.h:114
Definition: sccolormgmtstructs.h:92
Definition: sccolormgmtstructs.h:105