2 Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
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.
16 MagickCore image color methods.
18 #ifndef _MAGICKCORE_COLOR_H
19 #define _MAGICKCORE_COLOR_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #include <magick/pixel.h>
26 #include <magick/exception.h>
31 NoCompliance = 0x0000,
32 SVGCompliance = 0x0001,
33 X11Compliance = 0x0002,
34 XPMCompliance = 0x0004,
35 AllCompliance = 0x7fffffff
38 typedef struct _ColorInfo
55 *next; /* deprecated, use GetColorInfoList() */
61 typedef struct _ColorPacket
73 typedef struct _ErrorInfo
77 normalized_mean_error,
78 normalized_maximum_error;
81 extern MagickExport char
82 **GetColorList(const char *,unsigned long *,ExceptionInfo *);
84 extern MagickExport const ColorInfo
85 *GetColorInfo(const char *,ExceptionInfo *),
86 **GetColorInfoList(const char *,unsigned long *,ExceptionInfo *);
88 extern MagickExport ColorPacket
89 *GetImageHistogram(const Image *,unsigned long *,ExceptionInfo *);
91 extern MagickExport Image
92 *UniqueImageColors(const Image *,ExceptionInfo *);
94 extern MagickExport MagickBooleanType
95 IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
96 IsGrayImage(const Image *,ExceptionInfo *),
97 IsHistogramImage(const Image *,ExceptionInfo *),
98 IsImageSimilar(const Image *,const Image *,long *x,long *y,ExceptionInfo *),
99 IsMagickColorSimilar(const MagickPixelPacket *,const MagickPixelPacket *),
100 IsMonochromeImage(const Image *,ExceptionInfo *),
101 IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
102 IsOpaqueImage(const Image *,ExceptionInfo *),
103 IsPaletteImage(const Image *,ExceptionInfo *),
104 ListColorInfo(FILE *,ExceptionInfo *),
105 QueryColorDatabase(const char *,PixelPacket *,ExceptionInfo *),
106 QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
108 QueryMagickColor(const char *,MagickPixelPacket *,ExceptionInfo *),
109 QueryMagickColorname(const Image *,const MagickPixelPacket *,
110 const ComplianceType,char *,ExceptionInfo *);
112 extern MagickExport unsigned long
113 GetNumberColors(const Image *,FILE *,ExceptionInfo *);
115 extern MagickExport void
116 ConcatenateColorComponent(const MagickPixelPacket *,const ChannelType,
117 const ComplianceType,char *),
118 DestroyColorList(void),
119 GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
121 #if defined(__cplusplus) || defined(c_plusplus)