+% M a g i c k C o l o r M a t r i x I m a g e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickColorMatrixImage() apply color transformation to an image. The method
+% permits saturation changes, hue rotation, luminance to alpha, and various
+% other effects. Although variable-sized transformation matrices can be used,
+% typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA
+% (or RGBA with offsets). The matrix is similar to those used by Adobe Flash
+% except offsets are in column 6 rather than 5 (in support of CMYKA images)
+% and offsets are normalized (divide Flash offset by 255).
+%
+% The format of the MagickColorMatrixImage method is:
+%
+% MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
+% const KernelInfo *color_matrix)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o color_matrix: the color matrix.
+%
+*/
+WandExport MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
+ const KernelInfo *color_matrix)
+{
+ Image
+ *color_image;
+
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ if (color_matrix == (const KernelInfo *) NULL)
+ return(MagickFalse);
+ if (wand->images == (Image *) NULL)
+ ThrowWandException(WandError,"ContainsNoImages",wand->name);
+ color_image=ColorMatrixImage(wand->images,color_matrix,wand->exception);
+ if (color_image == (Image *) NULL)
+ return(MagickFalse);
+ ReplaceImageInList(&wand->images,color_image);
+ return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %