Skip to content

Commit

Permalink
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions coders/jpeg.c
Original file line number Diff line number Diff line change
@@ -2900,8 +2900,10 @@ static MagickBooleanType WriteJPEGImage_(const ImageInfo *image_info,
return(MagickFalse);
}
scanline[0]=(JSAMPROW) jpeg_pixels;
scale=65535/(unsigned short) GetQuantumRange((size_t)
jpeg_info->data_precision);
scale=0;
if (GetQuantumRange((size_t) jpeg_info->data_precision) != 0)
scale=65535/(unsigned short) GetQuantumRange((size_t)
jpeg_info->data_precision);
if (scale == 0)
scale=1;
if (jpeg_info->data_precision <= 8)
2 changes: 1 addition & 1 deletion coders/png.c
Original file line number Diff line number Diff line change
@@ -2862,7 +2862,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
png_get_valid(ping,ping_info,PNG_INFO_bKGD))
{
png_color_16
background;
background = { 0 };

#ifndef PNG_READ_EMPTY_PLTE_SUPPORTED
if (mng_info->have_saved_bkgd_index)
2 changes: 1 addition & 1 deletion coders/rle.c
Original file line number Diff line number Diff line change
@@ -195,7 +195,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
y;

unsigned char
background_color[256],
background_color[256] = { 0 },
*colormap,
pixel,
plane,

0 comments on commit 31d21ce

Please sign in to comment.