]> granicus.if.org Git - imagemagick/blob - magick/color.h
(no commit message)
[imagemagick] / magick / color.h
1 /*
2   Copyright 1999-2009 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 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24
25 #include <magick/pixel.h>
26 #include <magick/exception.h>
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   MagickPixelPacket
48     color;
49
50   MagickBooleanType
51     stealth;
52
53   struct _ColorInfo
54     *previous,
55     *next;  /* deprecated, use GetColorInfoList() */
56
57   unsigned long
58     signature;
59 } ColorInfo;
60
61 typedef struct _ErrorInfo
62 {
63   double
64     mean_error_per_pixel,
65     normalized_mean_error,
66     normalized_maximum_error;
67 } ErrorInfo;
68
69 extern MagickExport char
70   **GetColorList(const char *,unsigned long *,ExceptionInfo *);
71
72 extern MagickExport const ColorInfo
73   *GetColorInfo(const char *,ExceptionInfo *),
74   **GetColorInfoList(const char *,unsigned long *,ExceptionInfo *);
75
76 extern MagickExport MagickBooleanType
77   IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
78   IsGrayImage(const Image *,ExceptionInfo *),
79   IsImageSimilar(const Image *,const Image *,long *x,long *y,ExceptionInfo *),
80   IsMagickColorSimilar(const MagickPixelPacket *,const MagickPixelPacket *),
81   IsMonochromeImage(const Image *,ExceptionInfo *),
82   IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
83   IsOpaqueImage(const Image *,ExceptionInfo *),
84   ListColorInfo(FILE *,ExceptionInfo *),
85   QueryColorDatabase(const char *,PixelPacket *,ExceptionInfo *),
86   QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
87     ExceptionInfo *),
88   QueryMagickColor(const char *,MagickPixelPacket *,ExceptionInfo *),
89   QueryMagickColorname(const Image *,const MagickPixelPacket *,
90     const ComplianceType,char *,ExceptionInfo *);
91
92 extern MagickExport void
93   ConcatenateColorComponent(const MagickPixelPacket *,const ChannelType,
94     const ComplianceType,char *),
95   DestroyColorList(void),
96   GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
97
98 #if defined(__cplusplus) || defined(c_plusplus)
99 }
100 #endif
101
102 #endif