]> granicus.if.org Git - imagemagick/blob - MagickCore/color.h
(no commit message)
[imagemagick] / MagickCore / color.h
1 /*
2   Copyright 1999-2014 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 "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 {
30   UndefinedCompliance,
31   NoCompliance = 0x0000,
32   SVGCompliance = 0x0001,
33   X11Compliance = 0x0002,
34   XPMCompliance = 0x0004,
35   AllCompliance = 0x7fffffff
36 } ComplianceType;
37
38 typedef struct _ColorInfo
39 {
40   char
41     *path,
42     *name;
43
44   ComplianceType
45     compliance;
46
47   PixelInfo
48     color;
49
50   MagickBooleanType
51     exempt,
52     stealth;
53
54   size_t
55     signature;
56 } ColorInfo;
57
58 typedef struct _ErrorInfo
59 {
60   double
61     mean_error_per_pixel,
62     normalized_mean_error,
63     normalized_maximum_error;
64 } ErrorInfo;
65
66 extern MagickExport char
67   **GetColorList(const char *,size_t *,ExceptionInfo *);
68
69 extern MagickExport const ColorInfo
70   *GetColorInfo(const char *,ExceptionInfo *),
71   **GetColorInfoList(const char *,size_t *,ExceptionInfo *);
72
73 extern MagickExport MagickBooleanType
74   IsEquivalentAlpha(const Image *,const PixelInfo *,const PixelInfo *),
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
84   ConcatenateColorComponent(const PixelInfo *,const PixelChannel,
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