Added imaggif.h, imaggif.cpp (wxImage GIF-reading support); candidate
[wxWidgets.git] / include / wx / imaggif.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: imaggif.h
3 // Purpose: wxImage handler for GIFs (read-only)
4 // Author: Vaclav Slavik (of this header only)
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8 #ifndef _WX_IMAGGIF_H_
9 #define _WX_IMAGGIF_H_
10
11 #ifdef __GNUG__
12 #pragma interface "imaggif.h"
13 #endif
14
15 #include <wx/setup.h>
16 #include <wx/object.h>
17 #include <wx/string.h>
18 #include <wx/gdicmn.h>
19 #include <wx/stream.h>
20 #include <wx/image.h>
21
22 //-----------------------------------------------------------------------------
23 // wxGIFHandler
24 //-----------------------------------------------------------------------------
25
26 class WXDLLEXPORT wxGIFHandler : public wxImageHandler
27 {
28 DECLARE_DYNAMIC_CLASS(wxGIFHandler)
29
30 public:
31
32 inline wxGIFHandler()
33 {
34 m_name = "GIF file";
35 m_extension = "gif";
36 m_type = wxBITMAP_TYPE_GIF;
37 };
38
39 virtual bool LoadFile( wxImage *image, wxInputStream& stream );
40 virtual bool SaveFile( wxImage *image, wxOutputStream& stream );
41 };
42
43 #endif
44 // _WX_IMAGGIF_H_
45