1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Routines for loading and saving DIBs
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 class WXDLLEXPORT wxBitmap
;
16 class WXDLLEXPORT wxPalette
;
18 // ----------------------------------------------------------------------------
19 // Functions for working with DIBs
20 // ----------------------------------------------------------------------------
22 // VZ: we have 3 different sets of functions: from bitmap.cpp (wxCreateDIB and
23 // wxFreeDIB), from dib.cpp and from dataobj.cpp - surely there is some
24 // redundancy between them? (FIXME)
26 // defined in bitmap.cpp
27 extern bool wxCreateDIB(long xSize
, long ySize
, long bitsPerPixel
,
28 HPALETTE hPal
, LPBITMAPINFO
* lpDIBHeader
);
29 extern void wxFreeDIB(LPBITMAPINFO lpDIBHeader
);
31 // defined in ole/dataobj.cpp
32 extern size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi
, const wxBitmap
& bitmap
);
33 extern wxBitmap
wxConvertDIBToBitmap(const LPBITMAPINFO pbi
);
35 // the rest is defined in dib.cpp
37 // Save (device dependent) wxBitmap as a DIB
38 bool wxSaveBitmap(wxChar
*filename
, wxBitmap
*bitmap
, wxPalette
*colourmap
= NULL
);
40 // Load device independent bitmap into device dependent bitmap
41 wxBitmap
*wxLoadBitmap(wxChar
*filename
, wxPalette
**colourmap
= NULL
);
43 // Load into existing bitmap;
44 bool wxLoadIntoBitmap(wxChar
*filename
, wxBitmap
*bitmap
, wxPalette
**pal
= NULL
);
46 HANDLE
wxBitmapToDIB (HBITMAP hBitmap
, HPALETTE hPal
);
47 BOOL
wxReadDIB(LPTSTR lpFileName
, HBITMAP
*bitmap
, HPALETTE
*palette
);
48 HANDLE
wxReadDIB2(LPTSTR lpFileName
);
49 LPSTR
wxFindDIBBits (LPSTR lpbi
);
50 HPALETTE
wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo
);