18 #ifndef MAGICKCORE_PIXEL_ACCESSOR_H
19 #define MAGICKCORE_PIXEL_ACCESSOR_H
30 #if defined(__cplusplus) || defined(c_plusplus)
42 #if !defined(MAGICKCORE_HDRI_SUPPORT)
116 return(pixel[image->channel_map[channel].offset]);
122 return(image->channel_map[offset].channel);
128 return(image->channel_map[channel].offset);
134 return(image->channel_map[channel].traits);
139 return(image->number_channels);
221 return(pixel_info->black);
227 return(pixel_info->alpha);
242 sign=x < 0.0 ? -1.0 : 1.0;
256 intensity=(
MagickRealType) (0.212656f*pixel->red+0.715158f*pixel->green+
257 0.072186f*pixel->blue);
274 intensity=(
MagickRealType) (0.212656f*pixel->red+0.715158f*pixel->green+
275 0.072186f*pixel->blue);
368 return(image->number_meta_channels);
374 return(image->metacontent_extent);
405 if (image != (
Image *) NULL)
407 pixel_info->storage_class=image->storage_class;
408 pixel_info->colorspace=image->colorspace;
409 pixel_info->fuzz=image->fuzz;
410 pixel_info->depth=image->depth;
411 pixel_info->alpha_trait=image->alpha_trait;
439 return(image->channel_map[channel].traits);
467 return(x < 0.0f ? -x : x);
478 #if !defined(MAGICKCORE_HDRI_SUPPORT)
615 red_green=pixel_info->red-pixel_info->green;
616 green_blue=pixel_info->green-pixel_info->blue;
711 pixel[image->channel_map[channel].offset]=quantum;
720 image->channel_map[offset].channel=channel;
721 image->channel_map[channel].offset=offset;
722 image->channel_map[channel].traits=traits;
728 image->channel_map[offset].channel=channel;
729 image->channel_map[channel].offset=offset;
896 #if defined(__cplusplus) || defined(c_plusplus)
static void SetPixelChannelChannel(const Image *magick_restrict image, const PixelChannel channel, const ssize_t offset)
Definition: pixel-accessor.h:725
#define magick_restrict
Definition: MagickCore.h:41
MagickExport MagickRealType EncodePixelGamma(const MagickRealType pixel)
Definition: pixel.c:446
static size_t GetPixelMetacontentExtent(const Image *magick_restrict image)
Definition: pixel-accessor.h:371
MagickDoubleType MagickRealType
Definition: magick-type.h:124
static void SetPixelChannelAttributes(const Image *magick_restrict image, const PixelChannel channel, const PixelTrait traits, const ssize_t offset)
Definition: pixel-accessor.h:714
static Quantum GetPixelCyan(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:161
#define TransparentAlpha
Definition: image.h:26
static ssize_t GetPixelChannelOffset(const Image *magick_restrict image, const PixelChannel channel)
Definition: pixel-accessor.h:125
static PixelTrait GetPixelYTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:448
static void SetPixelBlackTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:679
static void SetPixelY(const Image *magick_restrict image, const Quantum y, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:885
static void SetPixelYTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:891
static PixelTrait GetPixelBlackTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:83
static void SetPixelBackgoundColor(const Image *magick_restrict image, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:649
static Quantum GetPixelAlpha(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:55
static PixelTrait GetPixelRedTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:391
static Quantum GetPixelCr(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:150
static void SetPixelMetacontentExtent(Image *image, const size_t extent)
Definition: pixel-accessor.h:851
Definition: colorspace.h:50
static void SetPixelOpacity(const Image *magick_restrict image, const Quantum alpha, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:856
static PixelTrait GetPixelIndexTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:203
static PixelTrait GetPixelAlphaTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:63
static Quantum GetPixelRed(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:385
static void SetPixelGrayTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:773
static Quantum GetPixelGray(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:172
static void SetPixelYellowTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:880
static void SetPixelGray(const Image *magick_restrict image, const Quantum gray, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:767
#define OpaqueAlpha
Definition: image.h:25
static Quantum GetPixelChannel(const Image *magick_restrict image, const PixelChannel channel, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:111
static PixelTrait GetPixelChannelTraits(const Image *magick_restrict image, const PixelChannel channel)
Definition: pixel-accessor.h:131
Definition: magick-type.h:165
static MagickRealType AbsolutePixelValue(const MagickRealType x)
Definition: pixel-accessor.h:465
static void SetPixelViaPixelInfo(const Image *magick_restrict image, const PixelInfo *magick_restrict pixel_info, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:801
static Quantum GetPixelReadMask(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:344
static MagickBooleanType IsPixelMonochrome(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:573
static Quantum GetPixela(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:49
static void SetPixela(const Image *magick_restrict image, const Quantum a, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:623
static PixelTrait GetPixelCbTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:106
#define MAGICKCORE_QUANTUM_DEPTH
Definition: magick-type.h:32
static Quantum GetPixelb(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:69
static MagickRealType GetPixelLuma(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:296
#define MagickEpsilon
Definition: magick-type.h:114
static Quantum ClampToQuantum(const MagickRealType quantum)
Definition: quantum.h:85
static MagickBooleanType IsPixelInfoEquivalent(const PixelInfo *magick_restrict p, const PixelInfo *magick_restrict q)
Definition: pixel-accessor.h:543
MagickExport MagickRealType DecodePixelGamma(const MagickRealType pixel)
Definition: pixel.c:319
static void SetPixelChannelTraits(Image *image, const PixelChannel channel, const PixelTrait traits)
Definition: pixel-accessor.h:737
static MagickBooleanType IsPixelEquivalent(const Image *magick_restrict image, const Quantum *magick_restrict p, const PixelInfo *magick_restrict q)
Definition: pixel-accessor.h:488
static Quantum ClampPixel(const MagickRealType pixel)
Definition: pixel-accessor.h:36
static void SetPixelRedTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:869
static MagickBooleanType IsPixelInfoMonochrome(const PixelInfo *magick_restrict pixel_info)
Definition: pixel-accessor.h:605
static Quantum GetPixelY(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:442
static void SetPixelAlphaTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:637
MagickBooleanType
Definition: magick-type.h:169
static double PerceptibleReciprocal(const double x)
Definition: pixel-accessor.h:234
MagickExport void * ResetMagickMemory(void *memory, int byte, const size_t size)
Definition: memory.c:1248
static Quantum GetPixelWriteMask(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:352
static void SetPixelChannels(Image *image, const size_t number_channels)
Definition: pixel-accessor.h:732
static void SetPixelL(const Image *magick_restrict image, const Quantum L, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:819
static PixelTrait GetPixelReadMaskTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:360
static Quantum GetPixelOpacity(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:377
static Quantum GetPixelMagenta(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:332
static void SetPixelMagentaTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:832
static MagickBooleanType IsPixelAtDepth(const Quantum pixel, const QuantumAny range)
Definition: pixel-accessor.h:470
static PixelTrait GetPixelCrTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:156
Definition: magick-type.h:172
static Quantum GetPixelGreen(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:183
static void GetPixelInfoPixel(const Image *magick_restrict image, const Quantum *magick_restrict pixel, PixelInfo *magick_restrict pixel_info)
Definition: pixel-accessor.h:396
static PixelTrait GetPixelCyanTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:167
static Quantum GetPixelIndex(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:195
static Quantum GetPixelBlack(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:75
static void SetPixelCr(const Image *magick_restrict image, const Quantum cr, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:750
static void SetPixelIndexTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:796
static MagickBooleanType IsPixelGray(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:525
static void SetPixelMagenta(const Image *magick_restrict image, const Quantum magenta, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:826
static PixelTrait GetPixelGreenTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:189
static PixelTrait GetPixelGrayTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:178
static void SetPixelBlue(const Image *magick_restrict image, const Quantum blue, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:684
Definition: colorspace.h:29
static void SetPixelWriteMask(const Image *magick_restrict image, const Quantum mask, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:844
PixelChannel
Definition: pixel.h:70
static void SetPixelCbTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:701
static size_t GetPixelChannels(const Image *magick_restrict image)
Definition: pixel-accessor.h:137
static void SetPixelCompositeMask(const Image *magick_restrict image, const Quantum mask, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:743
static void SetPixelCyan(const Image *magick_restrict image, const Quantum cyan, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:761
static PixelChannel GetPixelChannelChannel(const Image *magick_restrict image, const ssize_t offset)
Definition: pixel-accessor.h:119
static MagickRealType GetPixelInfoChannel(const PixelInfo *magick_restrict pixel_info, const PixelChannel channel)
Definition: pixel-accessor.h:209
Definition: magick-type.h:171
static void SetPixelCrTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:756
static PixelTrait GetPixelMagentaTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:338
unsigned short Quantum
Definition: magick-type.h:86
static size_t GetPixelMetaChannels(const Image *magick_restrict image)
Definition: pixel-accessor.h:366
static MagickBooleanType IsPixelInfoGray(const PixelInfo *magick_restrict pixel)
Definition: pixel-accessor.h:596
static Quantum GetPixelCb(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:100
static void SetPixelIndex(const Image *magick_restrict image, const Quantum index, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:789
size_t number_channels
Definition: image.h:283
static void SetPixelChannel(const Image *magick_restrict image, const PixelChannel channel, const Quantum quantum, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:706
static void SetPixelYellow(const Image *magick_restrict image, const Quantum yellow, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:874
static PixelTrait GetPixelTraits(const Image *magick_restrict image, const PixelChannel channel)
Definition: pixel-accessor.h:436
static Quantum GetPixelCompositeMask(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:142
static void SetPixelAlpha(const Image *magick_restrict image, const Quantum alpha, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:630
static MagickRealType GetPixelInfoLuminance(const PixelInfo *magick_restrict pixel)
Definition: pixel-accessor.h:266
size_t metacontent_extent
Definition: image.h:283
#define MaxPixelChannels
Definition: pixel.h:27
static void SetPixelGreenTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:784
static MagickRealType GetPixelLuminance(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:309
static PixelTrait GetPixelYellowTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:459
static ssize_t GetPixelLabel(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:290
static void SetPixelRed(const Image *magick_restrict image, const Quantum red, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:863
static MagickRealType GetPixelInfoLuma(const PixelInfo *magick_restrict pixel)
Definition: pixel-accessor.h:248
PixelTrait traits
Definition: pixel.h:166
static void SetPixelb(const Image *magick_restrict image, const Quantum b, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:642
static Quantum GetPixelYellow(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:453
static void SetPixelBlack(const Image *magick_restrict image, const Quantum black, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:672
static Quantum GetPixelBlue(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:89
PixelTrait
Definition: pixel.h:137
MagickSizeType QuantumAny
Definition: magick-type.h:155
static void SetPixelReadMask(const Image *magick_restrict image, const Quantum mask, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:837
static Quantum GetPixelL(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:284
static void SetPixelBlueTraits(Image *image, const PixelTrait traits)
Definition: pixel-accessor.h:690
static void SetPixelCb(const Image *magick_restrict image, const Quantum cb, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:695
#define QuantumRange
Definition: magick-type.h:87
PixelChannelMap * channel_map
Definition: image.h:291
static void SetPixelGreen(const Image *magick_restrict image, const Quantum green, Quantum *magick_restrict pixel)
Definition: pixel-accessor.h:778
static PixelTrait GetPixelBlueTraits(const Image *magick_restrict image)
Definition: pixel-accessor.h:95