From: cristy Date: Thu, 5 Sep 2013 16:15:56 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3332 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efc63e48d038c4e691517091a357021760c576c1;p=imagemagick --- diff --git a/coders/tiff.c b/coders/tiff.c index 8068eaba5..dd5127ef2 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -3084,10 +3084,7 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, if ((image_info->interlace == PlaneInterlace) || (image_info->interlace == PartitionInterlace)) (void) TIFFSetField(tiff,TIFFTAG_PLANARCONFIG,PLANARCONFIG_SEPARATE); - rows_per_strip=1; - if (TIFFScanlineSize(tiff) != 0) - rows_per_strip=(uint32) MagickMax((size_t) TIFFDefaultStripSize(tiff,0), - 1); + rows_per_strip=TIFFDefaultStripSize(tiff,0); option=GetImageOption(image_info,"tiff:rows-per-strip"); if (option != (const char *) NULL) rows_per_strip=(size_t) strtol(option,(char **) NULL,10); @@ -3197,6 +3194,8 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, default: break; } + if (rows_per_strip < 1) + rows_per_strip=1; if ((image->rows/rows_per_strip) >= (1UL << 15)) rows_per_strip=(image->rows >> 15); (void) TIFFSetField(tiff,TIFFTAG_ROWSPERSTRIP,rows_per_strip);