]> git.saurik.com Git - wxWidgets.git/blob - include/wx/imagjpeg.h
Smartphone fix.
[wxWidgets.git] / include / wx / imagjpeg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma interface "imagjpeg.h"
15 #endif
16
17 #include "wx/image.h"
18
19 // defines for wxImage::SetOption
20 #define wxIMAGE_OPTION_RESOLUTION wxString(_T("Resolution"))
21 #define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(_T("ResolutionUnit"))
22
23 enum
24 {
25 wxIMAGE_RESOLUTION_INCHES = 1,
26 wxIMAGE_RESOLUTION_CM = 2
27 };
28
29 //-----------------------------------------------------------------------------
30 // wxJPEGHandler
31 //-----------------------------------------------------------------------------
32
33 #if wxUSE_LIBJPEG
34 class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
35 {
36 public:
37 inline wxJPEGHandler()
38 {
39 m_name = wxT("JPEG file");
40 m_extension = wxT("jpg");
41 m_type = wxBITMAP_TYPE_JPEG;
42 m_mime = wxT("image/jpeg");
43 }
44
45 #if wxUSE_STREAMS
46 virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
47 virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
48 virtual bool DoCanRead( wxInputStream& stream );
49 #endif
50
51 private:
52 DECLARE_DYNAMIC_CLASS(wxJPEGHandler)
53 };
54 #endif
55
56
57
58 #endif
59 // _WX_IMAGJPEG_H_
60