2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 %
13 % MagickWand Deprecated Methods %
20 % Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % https://www.imagemagick.org/script/license.php %
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. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 #include "MagickWand/studio.h"
44 #include "MagickWand/MagickWand.h"
45 #include "MagickWand/magick-wand-private.h"
46 #include "MagickWand/wand.h"
47 #include "MagickCore/monitor-private.h"
48 #include "MagickCore/thread-private.h"
50 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 %
61 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 % MagickGetImageAlphaColor() returns the image alpha color.
65 % The format of the MagickGetImageAlphaColor method is:
67 % MagickBooleanType MagickGetImageAlphaColor(MagickWand *wand,
68 % PixelWand *alpha_color)
70 % A description of each parameter follows:
72 % o wand: the magick wand.
74 % o alpha_color: return the alpha color.
77 WandExport MagickBooleanType MagickGetImageAlphaColor(MagickWand *wand,
78 PixelWand *alpha_color)
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);
91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 %
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 % MagickSetImageAlphaColor() sets the image alpha color.
103 % The format of the MagickSetImageAlphaColor method is:
105 % MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand,
106 % const PixelWand *matte)
108 % A description of each parameter follows:
110 % o wand: the magick wand.
112 % o matte: the alpha pixel wand.
115 WandExport MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand,
116 const PixelWand *alpha)
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);