]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/imagpnm.h | |
3 | // Purpose: wxImage PNM handler | |
4 | // Author: Sylvain Bougnoux | |
5 | // Copyright: (c) Sylvain Bougnoux | |
6 | // Licence: wxWindows licence | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | #ifndef _WX_IMAGPNM_H_ | |
10 | #define _WX_IMAGPNM_H_ | |
11 | ||
12 | #include "wx/image.h" | |
13 | ||
14 | //----------------------------------------------------------------------------- | |
15 | // wxPNMHandler | |
16 | //----------------------------------------------------------------------------- | |
17 | ||
18 | #if wxUSE_PNM | |
19 | class WXDLLIMPEXP_CORE wxPNMHandler : public wxImageHandler | |
20 | { | |
21 | public: | |
22 | inline wxPNMHandler() | |
23 | { | |
24 | m_name = wxT("PNM file"); | |
25 | m_extension = wxT("pnm"); | |
26 | m_altExtensions.Add(wxT("ppm")); | |
27 | m_altExtensions.Add(wxT("pgm")); | |
28 | m_altExtensions.Add(wxT("pbm")); | |
29 | m_type = wxBITMAP_TYPE_PNM; | |
30 | m_mime = wxT("image/pnm"); | |
31 | } | |
32 | ||
33 | #if wxUSE_STREAMS | |
34 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
35 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
36 | protected: | |
37 | virtual bool DoCanRead( wxInputStream& stream ); | |
38 | #endif | |
39 | ||
40 | private: | |
41 | DECLARE_DYNAMIC_CLASS(wxPNMHandler) | |
42 | }; | |
43 | #endif | |
44 | ||
45 | ||
46 | #endif | |
47 | // _WX_IMAGPNM_H_ | |
48 |