if (value != (char *) NULL)
colorspace=StringToInteger(value);
sampling_factor=(const char *) NULL;
- if (colorspace == jpeg_info.in_color_space)
+ if ((J_COLOR_SPACE) colorspace == jpeg_info.in_color_space)
{
value=GetImageOption(image_info,"jpeg:sampling-factor");
if (value == (char *) NULL)
bytes_per_line=width;
row_bytes=(size_t) (image->columns | 0x8000);
if (image->storage_class == DirectClass)
- row_bytes=(size_t) ((4*image->columns) | 0x8000);
+ row_bytes=(size_t) (4*(image->columns | 0x8000));
/*
Allocate pixel and scanline buffer.
*/
/*
Allocate memory.
*/
- bytes_per_line=image->columns;
+ bytes_per_line=image->columns | 0x8000;
if (storage_class == DirectClass)
bytes_per_line*=image->alpha_trait != UndefinedPixelTrait ? 4 : 3;
buffer=(unsigned char *) AcquireQuantumMemory(PictInfoSize,sizeof(*buffer));
chunk=(unsigned char *) RelinquishMagickMemory(chunk);
- if (jng_width > 65535 || jng_height > 65535 ||
- (long) jng_width > GetMagickResourceLimit(WidthResource) ||
- (long) jng_height > GetMagickResourceLimit(HeightResource))
+ if ((jng_width > 65535) || (jng_height > 65535) ||
+ (MagickSizeType) jng_width > GetMagickResourceLimit(WidthResource) ||
+ (MagickSizeType) jng_height > GetMagickResourceLimit(HeightResource))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" JNG width or height too large: (%lu x %lu)",