else
{
SetRedPixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetRedPixelComponent(r) & 0xf0) |
- ScaleQuantumToChar(GetRedPixelComponent(r) & 0xf0) >> 4));
+ (ScaleQuantumToChar(GetRedPixelComponent(r)) & 0xf0) |
+ (ScaleQuantumToChar(GetRedPixelComponent(r)) & 0xf0) >> 4));
SetGreenPixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetGreenPixelComponent(r) & 0xf0) |
- ScaleQuantumToChar(GetGreenPixelComponent(r) & 0xf0) >> 4));
+ (ScaleQuantumToChar(GetGreenPixelComponent(r)) & 0xf0) |
+ (ScaleQuantumToChar(GetGreenPixelComponent(r)) & 0xf0) >>
+ 4));
SetBluePixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xf0) |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xf0) >> 4));
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xf0) |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xf0) >>
+ 4));
}
r++;
}
else
{
SetRedPixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetRedPixelComponent(r) & 0xe0) |
- ScaleQuantumToChar(GetRedPixelComponent(r) & 0xe0) >> 3 |
- ScaleQuantumToChar(GetRedPixelComponent(r) & 0xc0) >> 6));
+ (ScaleQuantumToChar(GetRedPixelComponent(r)) & 0xe0) |
+ (ScaleQuantumToChar(GetRedPixelComponent(r)) & 0xe0) >> 3 |
+ (ScaleQuantumToChar(GetRedPixelComponent(r)) & 0xc0) >>
+ 6));
SetGreenPixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetGreenPixelComponent(r) & 0xe0) |
- ScaleQuantumToChar(GetGreenPixelComponent(r) & 0xe0) >> 3 |
- ScaleQuantumToChar(GetGreenPixelComponent(r) & 0xc0) >> 6));
+ (ScaleQuantumToChar(GetGreenPixelComponent(r)) & 0xe0) |
+ (ScaleQuantumToChar(GetGreenPixelComponent(r)) & 0xe0) >>
+ 3 |
+ (ScaleQuantumToChar(GetGreenPixelComponent(r)) & 0xc0) >>
+ 6));
SetBluePixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xe0) |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xe0) >> 3 |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xc0) >> 6));
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xe0) |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xe0) >> 3 |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xc0) >>
+ 6));
}
r++;
}
else
{
SetBluePixelComponent(r,ScaleCharToQuantum(
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xc0) |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xc0) >> 2 |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xc0) >> 4 |
- ScaleQuantumToChar(GetBluePixelComponent(r) & 0xc0) >> 6));
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xc0) |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xc0) >> 2 |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xc0) >> 4 |
+ (ScaleQuantumToChar(GetBluePixelComponent(r)) & 0xc0) >>
+ 6));
}
r++;
}
if (mng_info->ping_exclude_tRNS != MagickFalse &&
(number_transparent != 0 || number_semitransparent != 0))
{
- int colortype=mng_info->write_png_colortype;
+ unsigned int colortype=mng_info->write_png_colortype;
if (ping_have_color == MagickFalse)
mng_info->write_png_colortype = 5;
mng_info->write_png_colortype = 7;
if (colortype != 0 &&
- mng_info->write_png_colortype != (ssize_t) colortype)
+ mng_info->write_png_colortype != colortype)
ping_need_colortype_warning=MagickTrue;
}
image_depth=MAGICKCORE_QUANTUM_DEPTH;
if ((image_colors == 0) ||
- ((ssize_t) (image_colors-1) > MaxColormapSize))
+ ((ssize_t) (image_colors-1) > (ssize_t) MaxColormapSize))
image_colors=(int) (one << image_depth);
if (image_depth > 8)
ping_bit_depth=1;
one=1;
- while ((one << ping_bit_depth) < number_colors)
+ while ((one << ping_bit_depth) < (ssize_t) number_colors)
ping_bit_depth <<= 1;
}