/////////////////////////////////////////////////////////////////////////////
// Name: imaggif.cpp
// Purpose: wxGIFHandler
-// Author: Vaclav Slavik
-// Based on wxGIFDecoder by Guillermo Rodriguez Garcia
+// Author: Vaclav Slavik & Guillermo Rodriguez Garcia
// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
# include "wx/defs.h"
#endif
+#if 1 // change this to #if wxUSE_GIF
+
#include "wx/image.h"
#include "wx/gifdecod.h"
#include "wx/wfstream.h"
#include "wx/module.h"
#include "wx/log.h"
+#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler)
+#endif
#if wxUSE_STREAMS
// wxGIFHandler
//-----------------------------------------------------------------------------
-bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose) )
+bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose )
{
wxGIFDecoder *decod;
bool ok;
if (decod->ReadGIF() != E_OK)
{
- wxLogDebug(_T("Error reading GIF"));
+ if (verbose)
+ wxLogDebug(_T("Error reading GIF"));
+
delete decod;
return FALSE;
}
bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image),
wxOutputStream& WXUNUSED(stream), bool verbose )
{
- if (verbose) wxLogDebug(_T("wxGIFHandler is read-only!!"));
+ if (verbose)
+ wxLogDebug(_T("wxGIFHandler is read-only!!"));
+
return FALSE;
}
}
#endif
+ // wxUSE_STREAMS
+
+#endif
+ // wxUSE_GIF