MagickCore  7.0.3
color.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 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)
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 
49  PixelInfo
51 
54  stealth;
55 
56  size_t
58 } ColorInfo;
59 
60 typedef struct _ErrorInfo
61 {
62  double
66 } ErrorInfo;
67 
68 extern MagickExport char
69  **GetColorList(const char *,size_t *,ExceptionInfo *);
70 
71 extern MagickExport const ColorInfo
72  *GetColorInfo(const char *,ExceptionInfo *),
73  **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
74 
76  IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y,
77  ExceptionInfo *),
78  ListColorInfo(FILE *,ExceptionInfo *),
79  QueryColorCompliance(const char *,const ComplianceType,PixelInfo *,
80  ExceptionInfo *),
81  QueryColorname(const Image *,const PixelInfo *,const ComplianceType,
82  char *,ExceptionInfo *);
83 
84 extern MagickExport void
86  const ComplianceType,char *),
87  GetColorTuple(const PixelInfo *,const MagickBooleanType,char *);
88 
89 #if defined(__cplusplus) || defined(c_plusplus)
90 }
91 #endif
92 
93 #endif
MagickExport const ColorInfo ** GetColorInfoList(const char *pattern, size_t *number_colors, ExceptionInfo *exception)
Definition: color.c:1297
MagickExport MagickBooleanType QueryColorname(const Image *magick_unused(image), const PixelInfo *color, const ComplianceType compliance, char *name, ExceptionInfo *exception)
Definition: color.c:2591
MagickExport MagickBooleanType ListColorInfo(FILE *file, ExceptionInfo *exception)
Definition: color.c:1908
ComplianceType compliance
Definition: color.h:47
struct _ColorInfo ColorInfo
double mean_error_per_pixel
Definition: color.h:63
MagickBooleanType exempt
Definition: color.h:53
Definition: image.h:151
double normalized_mean_error
Definition: color.h:63
char * path
Definition: color.h:43
MagickExport const ColorInfo * GetColorInfo(const char *name, ExceptionInfo *exception)
Definition: color.c:1088
MagickBooleanType
Definition: magick-type.h:158
char * name
Definition: color.h:43
PixelInfo color
Definition: color.h:50
MagickExport void GetColorTuple(const PixelInfo *pixel, const MagickBooleanType hex, char *tuple)
Definition: color.c:1556
MagickExport MagickBooleanType IsEquivalentImage(const Image *image, const Image *target_image, ssize_t *x_offset, ssize_t *y_offset, ExceptionInfo *exception)
Definition: color.c:1742
MagickExport MagickBooleanType QueryColorCompliance(const char *name, const ComplianceType compliance, PixelInfo *color, ExceptionInfo *exception)
Definition: color.c:2216
MagickExport void ConcatenateColorComponent(const PixelInfo *pixel, const PixelChannel channel, const ComplianceType compliance, char *tuple)
Definition: color.c:1124
PixelChannel
Definition: pixel.h:67
double normalized_maximum_error
Definition: color.h:63
struct _ErrorInfo ErrorInfo
MagickExport char ** GetColorList(const char *pattern, size_t *number_colors, ExceptionInfo *exception)
Definition: color.c:1390
#define MagickExport
size_t signature
Definition: color.h:57
MagickBooleanType stealth
Definition: color.h:53
ComplianceType
Definition: color.h:28