unsigned char
*profile;
-#if defined(TIFFTAG_ICCPROFILE)
length=0;
+#if defined(TIFFTAG_ICCPROFILE)
if (TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1)
(void) ReadProfile(image,"icc",profile,(ssize_t) length,exception);
#endif
#if defined(TIFFTAG_PHOTOSHOP)
- length=0;
if (TIFFGetField(tiff,TIFFTAG_PHOTOSHOP,&length,&profile) == 1)
(void) ReadProfile(image,"8bim",profile,(ssize_t) length,exception);
#endif
#if defined(TIFFTAG_RICHTIFFIPTC)
- length=0;
if (TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC,&length,&profile) == 1)
{
if (TIFFIsByteSwapped(tiff) != 0)
}
#endif
#if defined(TIFFTAG_XMLPACKET)
- length=0;
if (TIFFGetField(tiff,TIFFTAG_XMLPACKET,&length,&profile) == 1)
(void) ReadProfile(image,"xmp",profile,(ssize_t) length,exception);
#endif
- length=0;
if (TIFFGetField(tiff,37724,&length,&profile) == 1)
(void) ReadProfile(image,"tiff:37724",profile,(ssize_t) length,exception);
if (TIFFGetField(tiff,34118,&length,&profile) == 1)
Image
*image;
+ int
+ tiff_status;
+
MagickBooleanType
associated_alpha,
debug,
TIFFGetEXIFProperties(tiff,image,exception);
(void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
&samples_per_pixel);
- (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_RESOLUTIONUNIT,&units);
if ((TIFFGetFieldDefaulted(tiff,TIFFTAG_XRESOLUTION,&x_resolution) == 1) &&
(TIFFGetFieldDefaulted(tiff,TIFFTAG_YRESOLUTION,&y_resolution) == 1))
{
image->resolution.x=x_resolution;
image->resolution.y=y_resolution;
}
+ if (TIFFGetFieldDefaulted(tiff,TIFFTAG_RESOLUTIONUNIT,&units) == 1)
+ {
+ if (units == RESUNIT_INCH)
+ image->units=PixelsPerInchResolution;
+ if (units == RESUNIT_CENTIMETER)
+ image->units=PixelsPerCentimeterResolution;
+ }
if ((TIFFGetFieldDefaulted(tiff,TIFFTAG_XPOSITION,&x_position) == 1) &&
(TIFFGetFieldDefaulted(tiff,TIFFTAG_YPOSITION,&y_position) == 1))
{
char
sampling_factor[MaxTextExtent];
+ int
+ tiff_status;
+
uint16
horizontal,
vertical;
- if (TIFFGetFieldDefaulted(tiff,TIFFTAG_YCBCRSUBSAMPLING,&horizontal,&vertical) == 1)
+ tiff_status=TIFFGetFieldDefaulted(tiff,TIFFTAG_YCBCRSUBSAMPLING,
+ &horizontal,&vertical);
+ if (tiff_status == 1)
{
(void) FormatLocaleString(sampling_factor,MaxTextExtent,"%dx%d",
horizontal,vertical);
break;
}
associated_alpha=MagickFalse;
- if (TIFFGetFieldDefaulted(tiff,TIFFTAG_EXTRASAMPLES,&extra_samples,&sample_info) == 1)
+ tiff_status=TIFFGetFieldDefaulted(tiff,TIFFTAG_EXTRASAMPLES,&extra_samples,
+ &sample_info);
+ if (tiff_status == 1)
{
if (extra_samples == 0)
{
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
}
- if (units == RESUNIT_INCH)
- image->units=PixelsPerInchResolution;
- if (units == RESUNIT_CENTIMETER)
- image->units=PixelsPerCentimeterResolution;
value=(unsigned short) image->scene;
if (TIFFGetFieldDefaulted(tiff,TIFFTAG_PAGENUMBER,&value,&pages) == 1)
image->scene=value;
if ((image->storage_class == PseudoClass) &&
(photometric == PHOTOMETRIC_PALETTE))
{
+ int
+ tiff_status;
+
size_t
range;
/*
Initialize colormap.
*/
- if (TIFFGetField(tiff,TIFFTAG_COLORMAP,&red_colormap,&green_colormap,&blue_colormap) == 1)
+ tiff_status=TIFFGetField(tiff,TIFFTAG_COLORMAP,&red_colormap,
+ &green_colormap,&blue_colormap);
+ if (tiff_status == 1)
{
if ((red_colormap != (uint16 *) NULL) &&
(green_colormap != (uint16 *) NULL) &&