static inline void GetPixelInfoPixel(const Image *restrict image,
const Quantum *restrict pixel,PixelInfo *restrict pixel_info)
{
- pixel_info->red=(MagickRealType)
+ pixel_info->red=(double)
pixel[image->channel_map[RedPixelChannel].offset];
- pixel_info->green=(MagickRealType)
+ pixel_info->green=(double)
pixel[image->channel_map[GreenPixelChannel].offset];
- pixel_info->blue=(MagickRealType)
+ pixel_info->blue=(double)
pixel[image->channel_map[BluePixelChannel].offset];
pixel_info->black=0;
if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait)
- pixel_info->black=(MagickRealType)
+ pixel_info->black=(double)
pixel[image->channel_map[BlackPixelChannel].offset];
pixel_info->alpha=OpaqueAlpha;
if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait)
- pixel_info->alpha=(MagickRealType)
+ pixel_info->alpha=(double)
pixel[image->channel_map[AlphaPixelChannel].offset];
pixel_info->index=0;
if (image->channel_map[IndexPixelChannel].traits != UndefinedPixelTrait)
- pixel_info->index=(MagickRealType)
+ pixel_info->index=(double)
pixel[image->channel_map[IndexPixelChannel].offset];
}
typedef struct _QuantumInfo
QuantumInfo;
-static inline Quantum ClampToQuantum(const MagickRealType value)
+static inline Quantum ClampToQuantum(const double value)
{
#if defined(MAGICKCORE_HDRI_SUPPORT)
return((Quantum) value);
#else
if (value <= 0.0)
return((Quantum) 0);
- if (value >= (MagickRealType) QuantumRange)
+ if (value >= (double) QuantumRange)
return((Quantum) QuantumRange);
return((Quantum) (value+0.5));
#endif