MagickWand
7.1.2-29
Convert, Edit, Or Compose Bitmap Images
Toggle main menu visibility
Loading...
Searching...
No Matches
magick-wand-private.h
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/license/
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
#define MagickWandId "MagickWand"
26
#define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
27
(((i) & 0xfff) == 0) || \
28
((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
29
#define ThrowWandException(severity,tag,context) \
30
{ \
31
(void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
32
tag,"`%s'",context); \
33
return(MagickFalse); \
34
}
35
#define ThrowWandFatalException(severity,tag,context) \
36
{ \
37
ExceptionInfo *fatal_exception = AcquireExceptionInfo(); \
38
char *message = GetExceptionMessage(errno); \
39
(void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
40
"`%s'",context == (char *) NULL ? message : context); \
41
message=DestroyString(message); \
42
CatchException(fatal_exception); \
43
(void) DestroyExceptionInfo(fatal_exception); \
44
MagickWandTerminus(); \
45
_exit((int) (severity-FatalErrorException)+1); \
46
}
47
48
static
inline
void
CheckMagickCoreCompatibility(
void
)
49
{
50
const
char
51
*quantum;
52
53
size_t
54
depth;
55
56
quantum=GetMagickQuantumDepth(&depth);
57
if
(depth != MAGICKCORE_QUANTUM_DEPTH)
58
ThrowWandFatalException(WandError,
"QuantumDepthMismatch"
,quantum);
59
}
60
61
struct
_MagickWand
62
{
63
size_t
64
id;
65
66
char
67
name[MagickPathExtent];
/* Wand name to use for MagickWand Logs */
68
69
Image
70
*images;
/* The images in this wand - also the current image */
71
72
ImageInfo
73
*image_info;
/* Global settings used for images in Wand */
74
75
ExceptionInfo
76
*exception;
77
78
MagickBooleanType
79
insert_before,
/* wand set to first image, prepend new images */
80
image_pending,
/* this image is pending Next/Previous Iteration */
81
debug;
/* Log calls to MagickWand library */
82
83
size_t
84
signature;
85
};
86
87
#if defined(__cplusplus) || defined(c_plusplus)
88
}
89
#endif
90
91
#endif
_MagickWand
Definition
magick-wand-private.h:62
MagickWand
magick-wand-private.h
Generated by
1.17.0