MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
color.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 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  https://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 "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  AllCompliance = 0x7fffffff
38 
39 typedef struct _ColorInfo
40 {
41  char
42  *path,
43  *name;
44 
47 
48  PixelInfo
50 
53  stealth;
54 
55  size_t
57 } ColorInfo;
58 
59 typedef struct _ErrorInfo
60 {
61  double
62  mean_error_per_pixel,
64  normalized_maximum_error;
65 } ErrorInfo;
66 
67 extern MagickExport char
68  **GetColorList(const char *,size_t *,ExceptionInfo *);
69 
70 extern MagickExport const ColorInfo
71  *GetColorInfo(const char *,ExceptionInfo *),
72  **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
73 
75  IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y,
76  ExceptionInfo *),
77  ListColorInfo(FILE *,ExceptionInfo *),
78  QueryColorCompliance(const char *,const ComplianceType,PixelInfo *,
79  ExceptionInfo *),
80  QueryColorname(const Image *,const PixelInfo *,const ComplianceType,
81  char *,ExceptionInfo *);
82 
83 extern MagickExport void
85  const ComplianceType,char *),
86  GetColorTuple(const PixelInfo *,const MagickBooleanType,char *);
87 
88 #if defined(__cplusplus) || defined(c_plusplus)
89 }
90 #endif
91 
92 #endif
MagickExport MagickBooleanType ListColorInfo(FILE *, ExceptionInfo *)
MagickExport MagickBooleanType IsEquivalentImage(const Image *, const Image *, ssize_t *x, ssize_t *y, ExceptionInfo *)
MagickExport const ColorInfo * GetColorInfo(const char *, ExceptionInfo *)
ComplianceType compliance
Definition: color.h:46
struct _ColorInfo ColorInfo
MagickExport const ColorInfo ** GetColorInfoList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1297
MagickBooleanType exempt
Definition: color.h:52
Definition: image.h:151
double normalized_mean_error
Definition: color.h:62
char * path
Definition: color.h:42
MagickBooleanType
Definition: magick-type.h:156
char * name
Definition: color.h:42
PixelInfo color
Definition: color.h:49
MagickExport MagickBooleanType QueryColorname(const Image *, const PixelInfo *, const ComplianceType, char *, ExceptionInfo *)
MagickExport void ConcatenateColorComponent(const PixelInfo *, const PixelChannel, const ComplianceType, char *)
PixelChannel
Definition: pixel.h:66
MagickExport void GetColorTuple(const PixelInfo *, const MagickBooleanType, char *)
Definition: color.c:1556
struct _ErrorInfo ErrorInfo
MagickExport MagickBooleanType QueryColorCompliance(const char *, const ComplianceType, PixelInfo *, ExceptionInfo *)
#define MagickExport
size_t signature
Definition: color.h:56
MagickExport char ** GetColorList(const char *, size_t *, ExceptionInfo *)
Definition: color.c:1390
MagickBooleanType stealth
Definition: color.h:52
ComplianceType
Definition: color.h:28