]> git.saurik.com Git - wxWidgets.git/blame - include/wx/imagjpeg.h
Rename wxGetFileType to wxGetFileKind
[wxWidgets.git] / include / wx / imagjpeg.h
CommitLineData
8f493002
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: imagjpeg.h
3// Purpose: wxImage JPEG handler
4// Author: Vaclav Slavik
5// RCS-ID: $Id$
6// Copyright: (c) Vaclav Slavik
65571936 7// Licence: wxWindows licence
8f493002
VS
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_IMAGJPEG_H_
11#define _WX_IMAGJPEG_H_
12
12028905 13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
8f493002
VS
14#pragma interface "imagjpeg.h"
15#endif
16
17#include "wx/image.h"
18
89d38f8c
VS
19// defines for wxImage::SetOption
20#define wxIMAGE_OPTION_RESOLUTION wxString(_T("Resolution"))
21#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(_T("ResolutionUnit"))
22
23enum
24{
25 wxIMAGE_RESOLUTION_INCHES = 1,
26 wxIMAGE_RESOLUTION_CM = 2
27};
28
8f493002
VS
29//-----------------------------------------------------------------------------
30// wxJPEGHandler
31//-----------------------------------------------------------------------------
32
33#if wxUSE_LIBJPEG
34class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
35{
8f493002 36public:
2b5f62a0
VZ
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 }
8f493002
VS
44
45#if wxUSE_STREAMS
7beb59f3
WS
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 );
2b5f62a0 48 virtual bool DoCanRead( wxInputStream& stream );
8f493002 49#endif
2b5f62a0
VZ
50
51private:
52 DECLARE_DYNAMIC_CLASS(wxJPEGHandler)
8f493002
VS
53};
54#endif
55
56
57
58#endif
59 // _WX_IMAGJPEG_H_
60