(LocaleCompare(token,"magenta") == 0) ||
(LocaleCompare(token,"y") == 0) ||
(LocaleCompare(token,"yellow") == 0))
- SetImageColorspace(destination_image,CMYKColorspace,exception);
+ (void) SetImageColorspace(destination_image,CMYKColorspace,exception);
if ((LocaleCompare(token,"Cb") == 0) ||
(LocaleCompare(token,"Cr") == 0))
- SetImageColorspace(destination_image,YCbCrColorspace,exception);
+ (void) SetImageColorspace(destination_image,YCbCrColorspace,
+ exception);
+ if (LocaleCompare(token,"alpha") == 0)
+ (void) SetImageAlpha(destination_image,OpaqueAlpha,exception);
+ if (i >= GetPixelChannels(destination_image))
+ SetPixelMetaChannels(destination_image,i-
+ GetPixelChannels(destination_image)+1,exception);
GetMagickToken(p,&p,token);
break;
}
#endif
#include <math.h>
+#include <MagickCore/cache.h>
#include <MagickCore/cache-view.h>
#include <MagickCore/color.h>
#include <MagickCore/image.h>
pixel[image->channel_map[MaskPixelChannel].offset]=mask;
}
-static inline void SetPixelMetaChannels(Image *image,
- const size_t number_meta_channels)
-{
- image->number_meta_channels=number_meta_channels;
-}
-
static inline void SetPixelMetacontentExtent(Image *image,const size_t extent)
{
image->metacontent_extent=extent;
#include "MagickCore/property.h"
#include "MagickCore/blob.h"
#include "MagickCore/blob-private.h"
+#include "MagickCore/cache-private.h"
#include "MagickCore/color-private.h"
#include "MagickCore/draw.h"
#include "MagickCore/exception.h"
SetPixelChannelMapMask(image,channel_mask);
return(mask);
}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% S e t P i x e l M e t a C h a n n e l s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% SetPixelMetaChannels() sets the image meta channels.
+%
+% The format of the SetPixelMetaChannels method is:
+%
+% MagickBooleanType SetPixelMetaChannels(Image *image,
+% const size_t number_meta_channels,ExceptionInfo *exception)
+%
+% A description of each parameter follows:
+%
+% o image: the image.
+%
+% o number_meta_channels: the number of meta channels.
+%
+% o exception: return any errors or warnings in this structure.
+%
+*/
+MagickExport MagickBooleanType SetPixelMetaChannels(Image *image,
+ const size_t number_meta_channels,ExceptionInfo *exception)
+{
+ image->number_meta_channels=number_meta_channels;
+ return(SyncImagePixelCache(image,exception));
+}
ExceptionInfo *),
IsFuzzyEquivalencePixel(const Image *,const Quantum *,const Image *,
const Quantum *),
- IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *);
+ IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *),
+ SetPixelMetaChannels(Image *,const size_t,ExceptionInfo *);
extern MagickExport PixelChannelMap
*AcquirePixelChannelMap(void),