static SemaphoreInfo
*tiff_semaphore = (SemaphoreInfo *) NULL;
+static TIFFErrorHandler
+ error_handler,
+ warning_handler;
+
static volatile MagickBooleanType
instantiate_key = MagickFalse;
\f
TIFF
*tiff;
- TIFFErrorHandler
- error_handler,
- warning_handler;
-
TIFFMethodType
method;
return((Image *) NULL);
}
(void) SetMagickThreadValue(tiff_exception,exception);
- error_handler=TIFFSetErrorHandler(TIFFErrors);
- warning_handler=TIFFSetWarningHandler(TIFFWarnings);
tiff=TIFFClientOpen(image->filename,"rb",(thandle_t) image,TIFFReadBlob,
TIFFWriteBlob,TIFFSeekBlob,TIFFCloseBlob,TIFFGetBlobSize,TIFFMapBlob,
TIFFUnmapBlob);
if (tiff == (TIFF *) NULL)
{
- (void) TIFFSetWarningHandler(warning_handler);
- (void) TIFFSetErrorHandler(error_handler);
image=DestroyImageList(image);
return((Image *) NULL);
}
break;
}
} while (status != MagickFalse);
- (void) TIFFSetWarningHandler(warning_handler);
- (void) TIFFSetErrorHandler(error_handler);
TIFFClose(tiff);
TIFFReadPhotoshopLayers(image,image_info,exception);
if (image_info->number_scenes != 0)
{
if (CreateMagickThreadKey(&tiff_exception,NULL) == MagickFalse)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ error_handler=TIFFSetErrorHandler(TIFFErrors);
+ warning_handler=TIFFSetWarningHandler(TIFFWarnings);
#if defined(MAGICKCORE_HAVE_TIFFMERGEFIELDINFO) && defined(MAGICKCORE_HAVE_TIFFSETTAGEXTENDER)
if (tag_extender == (TIFFExtendProc) NULL)
tag_extender=TIFFSetTagExtender(TIFFTagExtender);
#endif
if (DeleteMagickThreadKey(tiff_exception) == MagickFalse)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ (void) TIFFSetWarningHandler(warning_handler);
+ (void) TIFFSetErrorHandler(error_handler);
instantiate_key=MagickFalse;
}
UnlockSemaphoreInfo(tiff_semaphore);
TIFF
*tiff;
- TIFFErrorHandler
- error_handler,
- warning_handler;
-
TIFFInfo
tiff_info;
if (status == MagickFalse)
return(status);
(void) SetMagickThreadValue(tiff_exception,exception);
- error_handler=TIFFSetErrorHandler((TIFFErrorHandler) TIFFErrors);
- warning_handler=TIFFSetWarningHandler((TIFFErrorHandler) TIFFWarnings);
endian_type=UndefinedEndian;
option=GetImageOption(image_info,"tiff:endian");
if (option != (const char *) NULL)
TIFFWriteBlob,TIFFSeekBlob,TIFFCloseBlob,TIFFGetBlobSize,TIFFMapBlob,
TIFFUnmapBlob);
if (tiff == (TIFF *) NULL)
- {
- (void) TIFFSetWarningHandler(warning_handler);
- (void) TIFFSetErrorHandler(error_handler);
- return(MagickFalse);
- }
+ return(MagickFalse);
scene=0;
debug=IsEventLogging();
(void) debug;
if (status == MagickFalse)
break;
} while (image_info->adjoin != MagickFalse);
- (void) TIFFSetWarningHandler(warning_handler);
- (void) TIFFSetErrorHandler(error_handler);
TIFFClose(tiff);
return(MagickTrue);
}