]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/imagjpeg.h | |
3 | // Purpose: wxImage JPEG handler | |
4 | // Author: Vaclav Slavik | |
5 | // RCS-ID: $Id$ | |
6 | // Copyright: (c) Vaclav Slavik | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_IMAGJPEG_H_ | |
11 | #define _WX_IMAGJPEG_H_ | |
12 | ||
13 | #include "wx/defs.h" | |
14 | ||
15 | //----------------------------------------------------------------------------- | |
16 | // wxJPEGHandler | |
17 | //----------------------------------------------------------------------------- | |
18 | ||
19 | #if wxUSE_LIBJPEG | |
20 | ||
21 | #include "wx/image.h" | |
22 | #include "wx/versioninfo.h" | |
23 | ||
24 | class WXDLLIMPEXP_CORE wxJPEGHandler: public wxImageHandler | |
25 | { | |
26 | public: | |
27 | inline wxJPEGHandler() | |
28 | { | |
29 | m_name = wxT("JPEG file"); | |
30 | m_extension = wxT("jpg"); | |
31 | m_altExtensions.Add(wxT("jpeg")); | |
32 | m_altExtensions.Add(wxT("jpe")); | |
33 | m_type = wxBITMAP_TYPE_JPEG; | |
34 | m_mime = wxT("image/jpeg"); | |
35 | } | |
36 | ||
37 | static wxVersionInfo GetLibraryVersionInfo(); | |
38 | ||
39 | #if wxUSE_STREAMS | |
40 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
41 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
42 | protected: | |
43 | virtual bool DoCanRead( wxInputStream& stream ); | |
44 | #endif | |
45 | ||
46 | private: | |
47 | DECLARE_DYNAMIC_CLASS(wxJPEGHandler) | |
48 | }; | |
49 | ||
50 | #endif // wxUSE_LIBJPEG | |
51 | ||
52 | #endif // _WX_IMAGJPEG_H_ | |
53 |