]> granicus.if.org Git - imagemagick/blob - magick/pixel.h
(no commit message)
[imagemagick] / magick / pixel.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 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 typedef struct _LongPixelPacket
29 {
30   unsigned long
31     red,
32     green,
33     blue,
34     opacity,
35     index;
36 } LongPixelPacket;
37
38 typedef struct _MagickPixelPacket
39 {
40   ClassType
41     storage_class;
42
43   ColorspaceType
44     colorspace;
45
46   MagickBooleanType
47     matte;
48
49   double
50     fuzz;
51
52   unsigned long
53     depth;
54
55   MagickRealType
56     red,
57     green,
58     blue,
59     opacity,
60     index;
61 } MagickPixelPacket;
62
63 typedef Quantum IndexPacket;
64
65 typedef struct _PixelPacket
66 {
67 #if defined(MAGICKCORE_WORDS_BIGENDIAN)
68   Quantum
69     red,
70     green,
71     blue,
72     opacity;
73 #else
74   Quantum
75     blue,
76     green,
77     red,
78     opacity;
79 #endif
80 } PixelPacket;
81
82 extern MagickExport MagickBooleanType
83   ExportImagePixels(const Image *,const long,const long,const unsigned long,
84     const unsigned long,const char *,const StorageType,void *,ExceptionInfo *),
85   ImportImagePixels(Image *,const long,const long,const unsigned long,
86     const unsigned long,const char *,const StorageType,const void *);
87
88 extern MagickExport void
89   GetMagickPixelPacket(const Image *,MagickPixelPacket *);
90
91 #if defined(__cplusplus) || defined(c_plusplus)
92 }
93 #endif
94
95 #endif