From 22df7b9483cab596aa026af054187489215c4743 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 3 Jun 2014 11:12:35 +0000 Subject: [PATCH] --- coders/tiff.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 7680176cb..41a793269 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -709,10 +709,15 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image, { if (exif_info[i].variable_length != 0) { + int + tiff_status; + uint16 *shorty; - if (TIFFGetField(tiff,exif_info[i].tag,&sans,&shorty,&sans,&sans) == 1) + tiff_status=TIFFGetField(tiff,exif_info[i].tag,&sans,&shorty,&sans, + &sans); + if (tiff_status == 1) (void) FormatLocaleString(value,MaxTextExtent,"%d",shorty[0]); } else @@ -1769,8 +1774,7 @@ RestoreMSCWarning q+=GetPixelChannels(image)*(image->columns-1); for (x=0; x < (ssize_t) image->columns; x++) { - SetPixelRed(image,ScaleCharToQuantum((unsigned char) TIFFGetR(*p)), - q); + SetPixelRed(image,ScaleCharToQuantum((unsigned char) TIFFGetR(*p)),q); SetPixelGreen(image,ScaleCharToQuantum((unsigned char) TIFFGetG(*p)),q); SetPixelBlue(image,ScaleCharToQuantum((unsigned char) TIFFGetB(*p)), -- 2.40.0