MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
color.h
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License. You may
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickCore image color methods.
17*/
18#ifndef MAGICKCORE_COLOR_H
19#define MAGICKCORE_COLOR_H
20
21#include "MagickCore/pixel.h"
22#include "MagickCore/exception.h"
23
24#if defined(__cplusplus) || defined(c_plusplus)
25extern "C" {
26#endif
27
28typedef enum
29{
30 UndefinedCompliance,
31 NoCompliance = 0x0000,
32 CSSCompliance = 0x0001,
33 SVGCompliance = 0x0001,
34 X11Compliance = 0x0002,
35 XPMCompliance = 0x0004,
36 MVGCompliance = 0x0008,
37 AllCompliance = 0x7fffffff
38} ComplianceType;
39
40typedef enum
41{
42 UndefinedIlluminant = 5,
43 AIlluminant = 0,
44 BIlluminant = 1,
45 CIlluminant = 2,
46 D50Illuminant = 3,
47 D55Illuminant = 4,
48 D65Illuminant = 5,
49 D75Illuminant = 6,
50 EIlluminant = 7,
51 F2Illuminant = 8,
52 F7Illuminant = 9,
53 F11Illuminant = 10
54} IlluminantType;
55
56typedef struct _ColorInfo
57{
58 char
59 *path,
60 *name;
61
62 ComplianceType
63 compliance;
64
66 color;
67
68 MagickBooleanType
69 exempt,
70 stealth;
71
72 size_t
73 signature;
74} ColorInfo;
75
76typedef struct _ErrorInfo
77{
78 double
79 mean_error_per_pixel,
80 normalized_mean_error,
81 normalized_maximum_error;
82} ErrorInfo;
83
84extern MagickExport char
85 **GetColorList(const char *,size_t *,ExceptionInfo *);
86
87extern MagickExport const ColorInfo
88 *GetColorInfo(const char *,ExceptionInfo *),
89 **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
90
91extern MagickExport MagickBooleanType
92 IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y,
94 ListColorInfo(FILE *,ExceptionInfo *),
95 QueryColorCompliance(const char *,const ComplianceType,PixelInfo *,
97 QueryColorname(const Image *,const PixelInfo *,const ComplianceType,
98 char *,ExceptionInfo *);
99
100extern MagickExport void
101 ConcatenateColorComponent(const PixelInfo *,const PixelChannel,
102 const ComplianceType,char *),
103 GetColorTuple(const PixelInfo *,const MagickBooleanType,char *);
104
105#if defined(__cplusplus) || defined(c_plusplus)
106}
107#endif
108
109#endif