static const char
*XVisualClassName(const int);
-static MagickRealType
+static double
blue_gamma = 1.0,
green_gamma = 1.0,
red_gamma = 1.0;
int
rotations;
- MagickRealType
+ double
normalized_degrees;
/*
i,
number_sizes;
- MagickRealType
+ double
scale_factor;
unsigned int
/*
Look for an icon size that maintains the aspect ratio of image.
*/
- scale_factor=(MagickRealType) icon_size->max_width/width;
- if (scale_factor > ((MagickRealType) icon_size->max_height/height))
- scale_factor=(MagickRealType) icon_size->max_height/height;
+ scale_factor=(double) icon_size->max_width/width;
+ if (scale_factor > ((double) icon_size->max_height/height))
+ scale_factor=(double) icon_size->max_height/height;
icon_width=(unsigned int) icon_size->min_width;
while ((int) icon_width < icon_size->max_width)
{
PixelInfo
pixel;
- MagickRealType
+ double
min_distance;
- register MagickRealType
+ register double
distance;
register int
number_colors=256;
(void) XQueryColors(display,colormap,colors,(int) number_colors);
}
- min_distance=3.0*((MagickRealType) QuantumRange+1.0)*((MagickRealType)
+ min_distance=3.0*((double) QuantumRange+1.0)*((double)
QuantumRange+1.0);
j=0;
for (i=0; i < (int) number_colors; i++)
{
- pixel.red=colors[i].red-(MagickRealType) color->red;
+ pixel.red=colors[i].red-(double) color->red;
distance=pixel.red*pixel.red;
if (distance > min_distance)
continue;
- pixel.green=colors[i].green-(MagickRealType) color->green;
+ pixel.green=colors[i].green-(double) color->green;
distance+=pixel.green*pixel.green;
if (distance > min_distance)
continue;
- pixel.blue=colors[i].blue-(MagickRealType) color->blue;
+ pixel.blue=colors[i].blue-(double) color->blue;
distance+=pixel.blue*pixel.blue;
if (distance > min_distance)
continue;
break;
for (x=0; x < (int) image->columns; x++)
{
- color.red=(double) ClampToQuantum((red_map[i][j][
+ color.red=(double) ClampToQuantum((double) (red_map[i][j][
(int) ScaleQuantumToChar(GetPixelRed(image,p))] << 8));
- color.green=(double) ClampToQuantum((green_map[i][j][
+ color.green=(double) ClampToQuantum((double) (green_map[i][j][
(int) ScaleQuantumToChar(GetPixelGreen(image,p))] << 8));
- color.blue=(double) ClampToQuantum((blue_map[i][j][
+ color.blue=(double) ClampToQuantum((double) (blue_map[i][j][
(int) ScaleQuantumToChar(GetPixelBlue(image,p))] << 8));
pixel=(size_t) (((size_t) color.red & 0xe0) |
(((size_t) color.green & 0xe0) >> 3) |
int
rotations;
- MagickRealType
+ double
normalized_degrees;
/*
/*
Set shadow color.
*/
- pixel->shadow_color.red=(unsigned short) (((MagickRealType)
+ pixel->shadow_color.red=(unsigned short) (((double)
pixel->matte_color.red*ScaleQuantumToShort(ShadowModulate))/65535L);
- pixel->shadow_color.green=(unsigned short) (((MagickRealType)
+ pixel->shadow_color.green=(unsigned short) (((double)
pixel->matte_color.green*ScaleQuantumToShort(ShadowModulate))/65535L);
- pixel->shadow_color.blue=(unsigned short) (((MagickRealType)
+ pixel->shadow_color.blue=(unsigned short) (((double)
pixel->matte_color.blue*ScaleQuantumToShort(ShadowModulate))/65535L);
pixel->shadow_color.pixel=XStandardPixel(map_info,&pixel->shadow_color);
pixel->shadow_color.flags=(char) (DoRed | DoGreen | DoBlue);
/*
Set depth color.
*/
- pixel->depth_color.red=(unsigned short) (((MagickRealType)
+ pixel->depth_color.red=(unsigned short) (((double)
pixel->matte_color.red*ScaleQuantumToShort(DepthModulate))/65535L);
- pixel->depth_color.green=(unsigned short) (((MagickRealType)
+ pixel->depth_color.green=(unsigned short) (((double)
pixel->matte_color.green*ScaleQuantumToShort(DepthModulate))/65535L);
- pixel->depth_color.blue=(unsigned short) (((MagickRealType)
+ pixel->depth_color.blue=(unsigned short) (((double)
pixel->matte_color.blue*ScaleQuantumToShort(DepthModulate))/65535L);
pixel->depth_color.pixel=XStandardPixel(map_info,&pixel->depth_color);
pixel->depth_color.flags=(char) (DoRed | DoGreen | DoBlue);
/*
Set trough color.
*/
- pixel->trough_color.red=(unsigned short) (((MagickRealType)
+ pixel->trough_color.red=(unsigned short) (((double)
pixel->matte_color.red*ScaleQuantumToShort(TroughModulate))/65535L);
- pixel->trough_color.green=(unsigned short) (((MagickRealType)
+ pixel->trough_color.green=(unsigned short) (((double)
pixel->matte_color.green*ScaleQuantumToShort(TroughModulate))/65535L);
- pixel->trough_color.blue=(unsigned short) (((MagickRealType)
+ pixel->trough_color.blue=(unsigned short) (((double)
pixel->matte_color.blue*ScaleQuantumToShort(TroughModulate))/65535L);
pixel->trough_color.pixel=XStandardPixel(map_info,&pixel->trough_color);
pixel->trough_color.flags=(char) (DoRed | DoGreen | DoBlue);
extern "C" {
#endif
-static inline MagickRealType DiversityPixelIntensity(
+static inline double DiversityPixelIntensity(
const DiversityPacket *pixel)
{
- MagickRealType
+ double
intensity;
intensity=0.298839*pixel->red+0.586811*pixel->green+0.114350*pixel->blue;
static inline Quantum ScaleXToQuantum(const size_t x,
const size_t scale)
{
- return((Quantum) (((MagickRealType) QuantumRange*x)/scale+0.5));
+ return((Quantum) (((double) QuantumRange*x)/scale+0.5));
}
MagickPrivate void XMakeStandardColormap(Display *display,