MagickCore  6.9.11-60
Convert, Edit, Or Compose Bitmap Images
color.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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)
25 extern "C" {
26 #endif
27 
28 typedef enum
29 {
31  NoCompliance = 0x0000,
32  CSSCompliance = 0x0001,
33  SVGCompliance = 0x0001,
34  X11Compliance = 0x0002,
35  XPMCompliance = 0x0004,
36  MVGCompliance = 0x0008,
37  AllCompliance = 0x7fffffff
39 
40 typedef struct _ColorInfo
41 {
42  char
43  *path,
44  *name;
45 
48 
51 
55 
56  struct _ColorInfo
58  *next; /* deprecated, use GetColorInfoList() */
59 
60  size_t
63 
64 typedef struct _ErrorInfo
65 {
66  double
71 
72 extern MagickExport char
73  **GetColorList(const char *,size_t *,ExceptionInfo *);
74 
75 extern MagickExport const ColorInfo
76  *GetColorInfo(const char *,ExceptionInfo *),
77  **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
78 
81  IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
82  IsImageSimilar(const Image *,const Image *,ssize_t *x,ssize_t *y,
83  ExceptionInfo *),
85  IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
88  ExceptionInfo *),
90  QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
91  ExceptionInfo *),
96  const ComplianceType,char *,ExceptionInfo *);
97 
98 extern MagickExport void
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
MagickExport MagickBooleanType QueryColorCompliance(const char *, const ComplianceType, PixelPacket *, ExceptionInfo *)
MagickExport MagickBooleanType ListColorInfo(FILE *, ExceptionInfo *)
MagickExport MagickBooleanType IsOpacitySimilar(const Image *, const PixelPacket *, const PixelPacket *)
MagickExport MagickBooleanType ColorComponentGenesis(void)
MagickExport MagickBooleanType QueryColorname(const Image *, const PixelPacket *, const ComplianceType, char *, ExceptionInfo *)
struct _ErrorInfo ErrorInfo
MagickExport MagickBooleanType QueryMagickColorname(const Image *, const MagickPixelPacket *, const ComplianceType, char *, ExceptionInfo *)
Definition: color.c:3076
MagickExport MagickBooleanType IsMagickColorSimilar(const MagickPixelPacket *, const MagickPixelPacket *)
MagickExport void ConcatenateColorComponent(const MagickPixelPacket *, const ChannelType, const ComplianceType, char *)
MagickExport MagickBooleanType IsColorSimilar(const Image *, const PixelPacket *, const PixelPacket *)
MagickExport char ** GetColorList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1369
MagickExport MagickBooleanType QueryMagickColorCompliance(const char *, const ComplianceType, MagickPixelPacket *, ExceptionInfo *)
struct _ColorInfo ColorInfo
MagickExport void ColorComponentTerminus(void)
MagickExport MagickBooleanType IsImageSimilar(const Image *, const Image *, ssize_t *x, ssize_t *y, ExceptionInfo *)
ComplianceType
Definition: color.h:29
@ CSSCompliance
Definition: color.h:32
@ SVGCompliance
Definition: color.h:33
@ MVGCompliance
Definition: color.h:36
@ NoCompliance
Definition: color.h:31
@ XPMCompliance
Definition: color.h:35
@ UndefinedCompliance
Definition: color.h:30
@ AllCompliance
Definition: color.h:37
@ X11Compliance
Definition: color.h:34
MagickExport const ColorInfo ** GetColorInfoList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1276
MagickExport const ColorInfo * GetColorInfo(const char *, ExceptionInfo *)
MagickExport MagickBooleanType QueryColorDatabase(const char *, PixelPacket *, ExceptionInfo *)
MagickExport MagickBooleanType QueryMagickColor(const char *, MagickPixelPacket *, ExceptionInfo *)
MagickExport void GetColorTuple(const MagickPixelPacket *, const MagickBooleanType, char *)
Definition: color.c:1512
ChannelType
Definition: magick-type.h:169
MagickBooleanType
Definition: magick-type.h:203
#define MagickExport
Definition: method-attribute.h:80
Definition: color.h:41
char * path
Definition: color.h:43
struct _ColorInfo * previous
Definition: color.h:56
MagickPixelPacket color
Definition: color.h:50
ComplianceType compliance
Definition: color.h:47
MagickBooleanType exempt
Definition: color.h:53
size_t signature
Definition: color.h:61
char * name
Definition: color.h:44
MagickBooleanType stealth
Definition: color.h:54
struct _ColorInfo * next
Definition: color.h:58
Definition: color.h:65
double normalized_maximum_error
Definition: color.h:69
double mean_error_per_pixel
Definition: color.h:67
double normalized_mean_error
Definition: color.h:68
Definition: exception.h:103
Definition: image.h:153
Definition: pixel.h:105
Definition: pixel.h:132