git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20682
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
class WXDLLEXPORT wxTIFFHandler: public wxImageHandler
{
public:
class WXDLLEXPORT wxTIFFHandler: public wxImageHandler
{
public:
- inline wxTIFFHandler()
- {
- m_name = wxT("TIFF file");
- m_extension = wxT("tif");
- m_type = wxBITMAP_TYPE_TIF;
- m_mime = wxT("image/tiff");
- }
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
+static void
+TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap)
+{
+ if (module != NULL)
+ wxLogWarning(_("tiff module: %s"), module);
+ wxLogWarning((wxChar *) fmt, ap);
+}
+
+static void
+TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap)
+{
+ if (module != NULL)
+ wxLogError(_("tiff module: %s"), module);
+ wxVLogError((wxChar *) fmt, ap);
+}
+
+wxTIFFHandler::wxTIFFHandler()
+{
+ m_name = wxT("TIFF file");
+ m_extension = wxT("tif");
+ m_type = wxBITMAP_TYPE_TIF;
+ m_mime = wxT("image/tiff");
+ TIFFSetWarningHandler((TIFFErrorHandler) TIFFwxWarningHandler);
+ TIFFSetErrorHandler((TIFFErrorHandler) TIFFwxErrorHandler);
+}
+
bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index )
{
if (index == -1)
bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index )
{
if (index == -1)