diff options
Diffstat (limited to 'plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp')
-rw-r--r-- | plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp b/plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp index 72218a2564..4e502c56e8 100644 --- a/plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp +++ b/plugins/AdvaImg/src/FreeImage/PluginTIFF.cpp @@ -193,9 +193,6 @@ TIFF * TIFFFdOpen(thandle_t handle, const char *name, const char *mode) { TIFF *tif; - // Set up the callback for extended TIFF directory tag support - // (see XTIFF.cpp) - XTIFFInitialize(); // Open the file; the callback will set everything up tif = TIFFClientOpen(name, mode, handle, @@ -1894,6 +1891,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { if(buf == NULL) { throw FI_MSG_ERROR_MEMORY; } + memset(buf, 0, TIFFStripSize(tif) * sizeof(BYTE)); BOOL bThrowMessage = FALSE; @@ -2622,6 +2620,10 @@ void DLL_CALLCONV InitTIFF(Plugin *plugin, int format_id) { s_format_id = format_id; + // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp) + // Must be called before using libtiff + XTIFFInitialize(); + plugin->format_proc = Format; plugin->description_proc = Description; plugin->extension_proc = Extension; |