MagickCore 6.9.13
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 "magick/pixel.h"
22#include "magick/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 struct _ColorInfo
41{
42 char
43 *path,
44 *name;
45
46 ComplianceType
47 compliance;
48
50 color;
51
52 MagickBooleanType
53 exempt,
54 stealth;
55
56 struct _ColorInfo
57 *previous,
58 *next; /* deprecated, use GetColorInfoList() */
59
60 size_t
61 signature;
62} ColorInfo;
63
64typedef struct _ErrorInfo
65{
66 double
67 mean_error_per_pixel,
68 normalized_mean_error,
69 normalized_maximum_error;
70} ErrorInfo;
71
72extern MagickExport char
73 **GetColorList(const char *,size_t *,ExceptionInfo *);
74
75extern MagickExport const ColorInfo
76 *GetColorInfo(const char *,ExceptionInfo *),
77 **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
78
79extern MagickExport MagickBooleanType
80 ColorComponentGenesis(void),
81 IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
82 IsImageSimilar(const Image *,const Image *,ssize_t *x,ssize_t *y,
84 IsMagickColorSimilar(const MagickPixelPacket *,const MagickPixelPacket *),
85 IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
86 ListColorInfo(FILE *,ExceptionInfo *),
87 QueryColorCompliance(const char *,const ComplianceType,PixelPacket *,
89 QueryColorDatabase(const char *,PixelPacket *,ExceptionInfo *),
90 QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
92 QueryMagickColorCompliance(const char *,const ComplianceType,
94 QueryMagickColor(const char *,MagickPixelPacket *,ExceptionInfo *),
95 QueryMagickColorname(const Image *,const MagickPixelPacket *,
96 const ComplianceType,char *,ExceptionInfo *);
97
98extern MagickExport void
99 ColorComponentTerminus(void),
100 ConcatenateColorComponent(const MagickPixelPacket *,const ChannelType,
101 const ComplianceType,char *),
102 GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
103
104#if defined(__cplusplus) || defined(c_plusplus)
105}
106#endif
107
108#endif