/src/imagemagick/MagickWand/magick-wand-private.h
Line | Count | Source |
1 | | /* |
2 | | Copyright @ 1999 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. You may |
6 | | obtain a copy of the License at |
7 | | |
8 | | https://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 | | ImageMagick pixel wand API. |
17 | | */ |
18 | | #ifndef MAGICKWAND_MAGICK_WAND_PRIVATE_H |
19 | | #define MAGICKWAND_MAGICK_WAND_PRIVATE_H |
20 | | |
21 | | #if defined(__cplusplus) || defined(c_plusplus) |
22 | | extern "C" { |
23 | | #endif |
24 | | |
25 | 0 | #define MagickWandId "MagickWand" |
26 | | #define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \ |
27 | | (((i) & 0xfff) == 0) || \ |
28 | | ((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1)))) |
29 | 0 | #define ThrowWandException(severity,tag,context) \ |
30 | 0 | { \ |
31 | 0 | (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \ |
32 | 0 | tag,"`%s'",context); \ |
33 | 0 | return(MagickFalse); \ |
34 | 0 | } |
35 | 0 | #define ThrowWandFatalException(severity,tag,context) \ |
36 | 0 | { \ |
37 | 0 | ExceptionInfo \ |
38 | 0 | *fatal_exception; \ |
39 | 0 | \ |
40 | 0 | fatal_exception=AcquireExceptionInfo(); \ |
41 | 0 | (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \ |
42 | 0 | "`%s'",context); \ |
43 | 0 | CatchException(fatal_exception); \ |
44 | 0 | (void) DestroyExceptionInfo(fatal_exception); \ |
45 | 0 | MagickWandTerminus(); \ |
46 | 0 | _exit((int) (severity-FatalErrorException)+1); \ |
47 | 0 | } |
48 | | |
49 | | static inline void CheckMagickCoreCompatibility(void) |
50 | 0 | { |
51 | 0 | const char |
52 | 0 | *quantum; |
53 | |
|
54 | 0 | size_t |
55 | 0 | depth; |
56 | |
|
57 | 0 | quantum=GetMagickQuantumDepth(&depth); |
58 | 0 | if (depth != MAGICKCORE_QUANTUM_DEPTH) |
59 | 0 | ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum); |
60 | 0 | } Unexecuted instantiation: drawing-wand.c:CheckMagickCoreCompatibility Unexecuted instantiation: magick-image.c:CheckMagickCoreCompatibility Unexecuted instantiation: magick-wand.c:CheckMagickCoreCompatibility Unexecuted instantiation: pixel-wand.c:CheckMagickCoreCompatibility Unexecuted instantiation: wand.c:CheckMagickCoreCompatibility |
61 | | |
62 | | struct _MagickWand |
63 | | { |
64 | | size_t |
65 | | id; |
66 | | |
67 | | char |
68 | | name[MagickPathExtent]; /* Wand name to use for MagickWand Logs */ |
69 | | |
70 | | Image |
71 | | *images; /* The images in this wand - also the current image */ |
72 | | |
73 | | ImageInfo |
74 | | *image_info; /* Global settings used for images in Wand */ |
75 | | |
76 | | ExceptionInfo |
77 | | *exception; |
78 | | |
79 | | MagickBooleanType |
80 | | insert_before, /* wand set to first image, prepend new images */ |
81 | | image_pending, /* this image is pending Next/Previous Iteration */ |
82 | | debug; /* Log calls to MagickWand library */ |
83 | | |
84 | | size_t |
85 | | signature; |
86 | | }; |
87 | | |
88 | | #if defined(__cplusplus) || defined(c_plusplus) |
89 | | } |
90 | | #endif |
91 | | |
92 | | #endif |