MagickCore  6.8.5
pixel.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2013 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 constitute methods.
17 */
18 #ifndef _MAGICKCORE_PIXEL_H
19 #define _MAGICKCORE_PIXEL_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 #include "magick/colorspace.h"
26 #include "magick/constitute.h"
27 
28 /*
29  Pixel enum declarations.
30 */
31 typedef enum
32 {
34  AverageInterpolatePixel, /* Average 4 nearest neighbours */
35  BicubicInterpolatePixel, /* Catmull-Rom interpolation */
36  BilinearInterpolatePixel, /* Triangular filter interpolation */
37  FilterInterpolatePixel, /* Use resize filter - (very slow) */
38  IntegerInterpolatePixel, /* Integer (floor) interpolation */
39  MeshInterpolatePixel, /* Triangular mesh interpolation */
40  NearestNeighborInterpolatePixel, /* Nearest neighbour only */
41  SplineInterpolatePixel, /* Cubic Spline (blurred) interpolation */
42  Average9InterpolatePixel, /* Average 9 nearest neighbours */
43  Average16InterpolatePixel, /* Average 16 nearest neighbours */
44  BlendInterpolatePixel, /* blend of nearest 1, 2 or 4 pixels */
45  BackgroundInterpolatePixel, /* just return background color */
46  CatromInterpolatePixel /* Catmull-Rom interpolation */
48 
49 typedef enum
50 {
51  PixelRed = 0,
52  PixelCyan = 0,
53  PixelGray = 0,
54  PixelY = 0,
57  PixelCb = 1,
58  PixelBlue = 2,
60  PixelCr = 2,
66 
67 typedef enum
68 {
80 
81 /*
82  Pixel typedef declarations.
83 */
84 typedef struct _DoublePixelPacket
85 {
86  double
87  red,
88  green,
89  blue,
90  opacity,
91  index;
93 
94 typedef struct _LongPixelPacket
95 {
96  unsigned int
97  red,
98  green,
99  blue,
100  opacity,
101  index;
103 
104 typedef struct _MagickPixelPacket
105 {
106  ClassType
108 
111 
114 
115  double
117 
118  size_t
120 
123  green,
124  blue,
125  opacity,
126  index;
128 
130 
131 typedef struct _PixelPacket
132 {
133 #if defined(MAGICKCORE_WORDS_BIGENDIAN)
134 #define MAGICK_PIXEL_RGBA 1
135  Quantum
136  red,
137  green,
138  blue,
139  opacity;
140 #else
141 #define MAGICK_PIXEL_BGRA 1
142  Quantum
144  green,
145  red,
146  opacity;
147 #endif
148 } PixelPacket;
149 
150 typedef struct _QuantumPixelPacket
151 {
152  Quantum
154  green,
155  blue,
156  opacity,
157  index;
159 
160 typedef struct _CacheView
161  CacheView_;
162 
163 /*
164  Pixel method declarations.
165 */
167  ExportImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
168  const size_t,const char *,const StorageType,void *,ExceptionInfo *),
169  ImportImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
170  const size_t,const char *,const StorageType,const void *),
172  const InterpolatePixelMethod,const double,const double,MagickPixelPacket *,
173  ExceptionInfo *);
174 
177 
180  EncodePixelGamma(const MagickRealType) magick_hot_spot,
181  GetPixelIntensity(const Image *image,const PixelPacket *restrict)
182  magick_hot_spot;
183 
184 extern MagickExport void
186 
187 #if defined(__cplusplus) || defined(c_plusplus)
188 }
189 #endif
190 
191 #endif