color.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.
00006   obtain a copy of the License at
00007   
00008     http://www.imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore image color methods.
00017 */
00018 #ifndef _MAGICKCORE_COLOR_H
00019 #define _MAGICKCORE_COLOR_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include <magick/pixel.h>
00026 #include <magick/exception.h>
00027 
00028 typedef enum
00029 {
00030   UndefinedCompliance,
00031   NoCompliance = 0x0000,
00032   SVGCompliance = 0x0001,
00033   X11Compliance = 0x0002,
00034   XPMCompliance = 0x0004,
00035   AllCompliance = 0x7fffffff
00036 } ComplianceType;
00037 
00038 typedef struct _ColorInfo
00039 {
00040   char
00041     *path,
00042     *name;
00043 
00044   ComplianceType
00045     compliance;
00046 
00047   MagickPixelPacket
00048     color;
00049 
00050   MagickBooleanType
00051     stealth;
00052 
00053   struct _ColorInfo
00054     *previous,
00055     *next;  /* deprecated, use GetColorInfoList() */
00056 
00057   unsigned long
00058     signature;
00059 } ColorInfo;
00060 
00061 typedef struct _ColorPacket
00062 {
00063   PixelPacket
00064     pixel;
00065 
00066   IndexPacket
00067     index;
00068 
00069   MagickSizeType
00070     count;
00071 } ColorPacket;
00072 
00073 typedef struct _ErrorInfo
00074 {
00075   double
00076     mean_error_per_pixel,
00077     normalized_mean_error,
00078     normalized_maximum_error;
00079 } ErrorInfo;
00080 
00081 extern MagickExport char
00082   **GetColorList(const char *,unsigned long *,ExceptionInfo *);
00083 
00084 extern MagickExport const ColorInfo
00085   *GetColorInfo(const char *,ExceptionInfo *),
00086   **GetColorInfoList(const char *,unsigned long *,ExceptionInfo *);
00087 
00088 extern MagickExport ColorPacket
00089   *GetImageHistogram(const Image *,unsigned long *,ExceptionInfo *);
00090 
00091 extern MagickExport Image
00092   *UniqueImageColors(const Image *,ExceptionInfo *);
00093 
00094 extern MagickExport MagickBooleanType
00095   IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
00096   IsGrayImage(const Image *,ExceptionInfo *),
00097   IsHistogramImage(const Image *,ExceptionInfo *),
00098   IsImageSimilar(const Image *,const Image *,long *x,long *y,ExceptionInfo *),
00099   IsMagickColorSimilar(const MagickPixelPacket *,const MagickPixelPacket *),
00100   IsMonochromeImage(const Image *,ExceptionInfo *),
00101   IsOpacitySimilar(const Image *,const PixelPacket *,const PixelPacket *),
00102   IsOpaqueImage(const Image *,ExceptionInfo *),
00103   IsPaletteImage(const Image *,ExceptionInfo *),
00104   ListColorInfo(FILE *,ExceptionInfo *),
00105   QueryColorDatabase(const char *,PixelPacket *,ExceptionInfo *),
00106   QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
00107     ExceptionInfo *),
00108   QueryMagickColor(const char *,MagickPixelPacket *,ExceptionInfo *),
00109   QueryMagickColorname(const Image *,const MagickPixelPacket *,
00110     const ComplianceType,const MagickBooleanType,char *,ExceptionInfo *);
00111 
00112 extern MagickExport unsigned long
00113   GetNumberColors(const Image *,FILE *,ExceptionInfo *);
00114 
00115 extern MagickExport void
00116   ConcatenateColorComponent(const MagickPixelPacket *,const ChannelType,
00117     const ComplianceType,char *),
00118   DestroyColorList(void),
00119   GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
00120 
00121 #if defined(__cplusplus) || defined(c_plusplus)
00122 }
00123 #endif
00124 
00125 #endif

Generated on Sat Jan 26 14:50:29 2008 for MagickCore by  doxygen 1.5.4