2 Copyright 1999-2012 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 constitute methods.
18 #ifndef _MAGICKCORE_PIXEL_H
19 #define _MAGICKCORE_PIXEL_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #include <MagickCore/colorspace.h>
27 #define MaxPixelChannels 32
32 UndefinedChannel = 0x0000,
36 GreenChannel = 0x0002,
37 MagentaChannel = 0x0002,
39 YellowChannel = 0x0004,
40 BlackChannel = 0x0008,
41 AlphaChannel = 0x0010,
42 OpacityChannel = 0x0010,
43 IndexChannel = 0x0020,
46 CompositeChannels = 0x002F,
47 AllChannels = 0x7ffffff,
49 Special purpose channel types.
51 TrueAlphaChannel = 0x0100, /* extract actual alpha channel from opacity */
52 RGBChannels = 0x0200, /* set alpha from grayscale mask in RGB */
53 GrayChannels = 0x0400,
54 SyncChannels = 0x1000, /* channels should be modified equally */
55 DefaultChannels = ((AllChannels | SyncChannels) &~ AlphaChannel)
56 } ChannelType; /* must correspond to PixelChannel */
60 UndefinedInterpolatePixel,
61 AverageInterpolatePixel,
62 BicubicInterpolatePixel,
63 BilinearInterpolatePixel,
64 FilterInterpolatePixel,
65 IntegerInterpolatePixel,
67 NearestNeighborInterpolatePixel,
68 SplineInterpolatePixel
69 } PixelInterpolateMethod;
73 UndefinedPixelChannel = 0,
78 GreenPixelChannel = 1,
79 MagentaPixelChannel = 1,
82 YellowPixelChannel = 2,
84 BlackPixelChannel = 3,
85 AlphaPixelChannel = 4,
86 IndexPixelChannel = 5,
89 IntensityPixelChannel = MaxPixelChannels,
90 CompositePixelChannel = MaxPixelChannels,
91 SyncPixelChannel = MaxPixelChannels+1
92 } PixelChannel; /* must correspond to ChannelType */
96 UndefinedPixelTrait = 0x000000,
97 CopyPixelTrait = 0x000001,
98 UpdatePixelTrait = 0x000002,
99 BlendPixelTrait = 0x000004
102 typedef struct _PixelChannelMap
114 typedef struct _PixelInfo
143 typedef struct _PixelPacket
165 typedef struct _CacheView
168 extern MagickExport ChannelType
169 SetPixelChannelMask(Image *,const ChannelType);
171 extern MagickExport MagickBooleanType
172 ExportImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
173 const size_t,const char *,const StorageType,void *,ExceptionInfo *),
174 ImportImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
175 const size_t,const char *,const StorageType,const void *,ExceptionInfo *),
176 InterpolatePixelChannel(const Image *,const CacheView_ *,
177 const PixelChannel,const PixelInterpolateMethod,const double,const double,
178 double *,ExceptionInfo *),
179 InterpolatePixelChannels(const Image *,const CacheView_ *,const Image *,
180 const PixelInterpolateMethod,const double,const double,Quantum *,
182 InterpolatePixelInfo(const Image *,const CacheView_ *,
183 const PixelInterpolateMethod,const double,const double,PixelInfo *,
185 IsFuzzyEquivalencePixel(const Image *,const Quantum *,const Image *,
187 IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *);
189 extern MagickExport PixelChannelMap
190 *AcquirePixelChannelMap(void),
191 *ClonePixelChannelMap(PixelChannelMap *),
192 *DestroyPixelChannelMap(PixelChannelMap *);
194 extern MagickExport PixelInfo
195 *ClonePixelInfo(const PixelInfo *);
197 extern MagickExport void
198 InitializePixelChannelMap(Image *),
199 GetPixelInfo(const Image *,PixelInfo *),
200 SetPixelChannelMapMask(Image *,const ChannelType);
202 #if defined(__cplusplus) || defined(c_plusplus)