MagickCore  6.9.7
color.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2017 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.
6  obtain a copy of the License at
7 
8  http://www.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  AllCompliance = 0x7fffffff
38 
39 typedef struct _ColorInfo
40 {
41  char
42  *path,
43  *name;
44 
47 
50 
53  stealth;
54 
55  struct _ColorInfo
56  *previous,
57  *next; /* deprecated, use GetColorInfoList() */
58 
59  size_t
61 } ColorInfo;
62 
63 typedef struct _ErrorInfo
64 {
65  double
66  mean_error_per_pixel,
68  normalized_maximum_error;
69 } ErrorInfo;
70 
71 extern MagickExport char
72  **GetColorList(const char *,size_t *,ExceptionInfo *);
73 
74 extern MagickExport const ColorInfo
75  *GetColorInfo(const char *,ExceptionInfo *),
76  **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
77 
80  IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
81  IsImageSimilar(const Image *,const Image *,ssize_t *x,ssize_t *y,
82  ExceptionInfo *),
84  IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
85  ListColorInfo(FILE *,ExceptionInfo *),
86  QueryColorCompliance(const char *,const ComplianceType,PixelPacket *,
87  ExceptionInfo *),
89  QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
90  ExceptionInfo *),
91  QueryMagickColorCompliance(const char *,const ComplianceType,
95  const ComplianceType,char *,ExceptionInfo *);
96 
97 extern MagickExport void
100  const ComplianceType,char *),
101  GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
102 
103 #if defined(__cplusplus) || defined(c_plusplus)
104 }
105 #endif
106 
107 #endif
MagickExport MagickBooleanType ListColorInfo(FILE *, ExceptionInfo *)
MagickExport MagickBooleanType QueryColorCompliance(const char *, const ComplianceType, PixelPacket *, ExceptionInfo *)
MagickExport const ColorInfo * GetColorInfo(const char *, ExceptionInfo *)
ComplianceType compliance
Definition: color.h:46
Definition: exception.h:102
Definition: color.h:36
struct _ColorInfo ColorInfo
MagickExport MagickBooleanType IsMagickColorSimilar(const MagickPixelPacket *, const MagickPixelPacket *)
MagickExport const ColorInfo ** GetColorInfoList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1298
Definition: pixel.h:131
MagickBooleanType exempt
Definition: color.h:52
MagickExport MagickBooleanType QueryMagickColor(const char *, MagickPixelPacket *, ExceptionInfo *)
Definition: color.h:39
Definition: image.h:152
double normalized_mean_error
Definition: color.h:66
char * path
Definition: color.h:42
MagickBooleanType
Definition: magick-type.h:211
char * name
Definition: color.h:42
Definition: pixel.h:104
MagickExport void ConcatenateColorComponent(const MagickPixelPacket *, const ChannelType, const ComplianceType, char *)
Definition: color.h:30
Definition: color.h:33
struct _ColorInfo * previous
Definition: color.h:55
Definition: color.h:63
MagickExport MagickBooleanType QueryMagickColorCompliance(const char *, const ComplianceType, MagickPixelPacket *, ExceptionInfo *)
ChannelType
Definition: magick-type.h:177
MagickExport MagickBooleanType QueryColorDatabase(const char *, PixelPacket *, ExceptionInfo *)
MagickExport MagickBooleanType IsOpacitySimilar(const Image *, const PixelPacket *, const PixelPacket *)
MagickExport void ColorComponentTerminus(void)
MagickExport MagickBooleanType QueryMagickColorname(const Image *, const MagickPixelPacket *, const ComplianceType, char *, ExceptionInfo *)
Definition: color.c:2962
struct _ColorInfo * next
Definition: color.h:55
struct _ErrorInfo ErrorInfo
MagickExport MagickBooleanType QueryColorname(const Image *, const PixelPacket *, const ComplianceType, char *, ExceptionInfo *)
MagickExport void GetColorTuple(const MagickPixelPacket *, const MagickBooleanType, char *)
Definition: color.c:1534
Definition: color.h:31
Definition: color.h:35
MagickExport MagickBooleanType ColorComponentGenesis(void)
#define MagickExport
Definition: method-attribute.h:98
size_t signature
Definition: color.h:60
MagickExport char ** GetColorList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1391
MagickExport MagickBooleanType IsImageSimilar(const Image *, const Image *, ssize_t *x, ssize_t *y, ExceptionInfo *)
MagickPixelPacket color
Definition: color.h:49
MagickBooleanType stealth
Definition: color.h:52
ComplianceType
Definition: color.h:28
Definition: color.h:34
MagickExport MagickBooleanType IsColorSimilar(const Image *, const PixelPacket *, const PixelPacket *)
Definition: color.h:32