MagickWand  7.0.7
Convert, Edit, Or Compose Bitmap Images
deprecate.c
Go to the documentation of this file.
1 /*
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % %
4 % %
5 % %
6 % DDDD EEEEE PPPP RRRR EEEEE CCCC AAA TTTTT EEEEE %
7 % D D E P P R R E C A A T E %
8 % D D EEE PPPPP RRRR EEE C AAAAA T EEE %
9 % D D E P R R E C A A T E %
10 % DDDD EEEEE P R R EEEEE CCCC A A T EEEEE %
11 % %
12 % %
13 % MagickWand Deprecated Methods %
14 % %
15 % Software Design %
16 % Cristy %
17 % October 2002 %
18 % %
19 % %
20 % Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
22 % %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
25 % %
26 % https://www.imagemagick.org/script/license.php %
27 % %
28 % Unless required by applicable law or agreed to in writing, software %
29 % distributed under the License is distributed on an "AS IS" BASIS, %
30 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31 % See the License for the specific language governing permissions and %
32 % limitations under the License. %
33 % %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 %
36 %
37 %
38 */
39 
40 /*
41  Include declarations.
42 */
43 #include "MagickWand/studio.h"
44 #include "MagickWand/MagickWand.h"
46 #include "MagickWand/wand.h"
47 #include "MagickCore/monitor-private.h"
48 #include "MagickCore/thread-private.h"
49 
50 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
51 
52 /*
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 % %
55 % %
56 % %
57 % M a g i c k G e t I m a g e A l p h a C o l o r %
58 % %
59 % %
60 % %
61 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 %
63 % MagickGetImageAlphaColor() returns the image alpha color.
64 %
65 % The format of the MagickGetImageAlphaColor method is:
66 %
67 % MagickBooleanType MagickGetImageAlphaColor(MagickWand *wand,
68 % PixelWand *alpha_color)
69 %
70 % A description of each parameter follows:
71 %
72 % o wand: the magick wand.
73 %
74 % o alpha_color: return the alpha color.
75 %
76 */
78  PixelWand *alpha_color)
79 {
80  assert(wand != (MagickWand *)NULL);
81  assert(wand->signature == MagickWandSignature);
82  if (wand->debug != MagickFalse)
83  (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
84  if (wand->images == (Image *)NULL)
85  ThrowWandException(WandError, "ContainsNoImages", wand->name);
86  PixelSetPixelColor(alpha_color,&wand->images->matte_color);
87  return(MagickTrue);
88 }
89 
90 /*
91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92 % %
93 % %
94 % %
95 % M a g i c k S e t I m a g e A l p h a C o l o r %
96 % %
97 % %
98 % %
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 %
101 % MagickSetImageAlphaColor() sets the image alpha color.
102 %
103 % The format of the MagickSetImageAlphaColor method is:
104 %
105 % MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand,
106 % const PixelWand *matte)
107 %
108 % A description of each parameter follows:
109 %
110 % o wand: the magick wand.
111 %
112 % o matte: the alpha pixel wand.
113 %
114 */
116  const PixelWand *alpha)
117 {
118  assert(wand != (MagickWand *)NULL);
119  assert(wand->signature == MagickWandSignature);
120  if (wand->debug != MagickFalse)
121  (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
122  if (wand->images == (Image *)NULL)
123  ThrowWandException(WandError,"ContainsNoImages",wand->name);
124  PixelGetQuantumPacket(alpha,&wand->images->matte_color);
125  return(MagickTrue);
126 }
127 #endif
#define MagickWandSignature
#define WandExport
WandExport void PixelGetQuantumPacket(const PixelWand *wand, PixelInfo *packet)
Definition: pixel-wand.c:1258
WandExport void PixelSetPixelColor(PixelWand *wand, const PixelInfo *color)
Definition: pixel-wand.c:2108
MagickBooleanType debug
char name[MagickPathExtent]
WandExport MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand, const PixelWand *alpha)
Definition: deprecate.c:115
WandExport MagickBooleanType MagickGetImageAlphaColor(MagickWand *wand, PixelWand *alpha_color)
Definition: deprecate.c:77
#define ThrowWandException(severity, tag, context)