]> git.saurik.com Git - wxWidgets.git/blame - include/wx/imagbmp.h
Moved client data stuff directly into wxEvtHandler, #if'd out
[wxWidgets.git] / include / wx / imagbmp.h
CommitLineData
8f493002
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: imagbmp.h
3// Purpose: wxImage BMP handler
4// Author: Robert Roebling
5// RCS-ID: $Id$
6// Copyright: (c) Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_IMAGBMP_H_
11#define _WX_IMAGBMP_H_
12
13#ifdef __GNUG__
14#pragma interface "imagbmp.h"
15#endif
16
17#include "wx/image.h"
18
1971d23c
VZ
19// defines for saving the BMP file in different formats, Bits Per Pixel
20// USE: wximage.SetOption( wxBMP_FORMAT, wxBMP_xBPP );
21#define wxBMP_FORMAT wxString(_T("wxBMP_FORMAT"))
22
23enum
24{
25 wxBMP_24BPP = 24, // default, do not need to set
26 //wxBMP_16BPP = 16, // wxQuantize can only do 236 colors?
27 wxBMP_8BPP = 8, // 8bpp, quantized colors
28 wxBMP_8BPP_GREY = 9, // 8bpp, rgb averaged to greys
29 wxBMP_8BPP_GRAY = wxBMP_8BPP_GREY,
30 wxBMP_8BPP_RED = 10, // 8bpp, red used as greyscale
31 wxBMP_8BPP_PALETTE = 11, // 8bpp, use the wxImage's palette
32 wxBMP_4BPP = 4, // 4bpp, quantized colors
33 wxBMP_1BPP = 1, // 1bpp, quantized "colors"
34 wxBMP_1BPP_BW = 2 // 1bpp, black & white from red
35};
36
f6bcfd97 37// ----------------------------------------------------------------------------
8f493002 38// wxBMPHandler
f6bcfd97 39// ----------------------------------------------------------------------------
8f493002 40
f6bcfd97 41class WXDLLEXPORT wxBMPHandler : public wxImageHandler
8f493002 42{
8f493002 43public:
f6bcfd97 44 wxBMPHandler()
8f493002 45 {
f6bcfd97
BP
46 m_name = _T("BMP file");
47 m_extension = _T("bmp");
8f493002 48 m_type = wxBITMAP_TYPE_BMP;
f6bcfd97 49 m_mime = _T("image/bmp");
8f493002
VS
50 };
51
52#if wxUSE_STREAMS
f6bcfd97
BP
53 virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
54
8f493002
VS
55 virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
56 virtual bool DoCanRead( wxInputStream& stream );
f6bcfd97
BP
57#endif // wxUSE_STREAMS
58
59 DECLARE_DYNAMIC_CLASS(wxBMPHandler)
8f493002
VS
60};
61
62
63#endif
64 // _WX_IMAGBMP_H_
65