1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 12:30:56 +00:00
|
|
|
// Name: wx/msw/dib.h
|
1998-05-20 14:12:05 +00:00
|
|
|
// Purpose: Routines for loading and saving DIBs
|
|
|
|
// Author: Various
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-11-24 12:30:56 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-24 19:50:17 +00:00
|
|
|
#ifndef _WX_DIB_H_
|
|
|
|
#define _WX_DIB_H_
|
|
|
|
|
1999-11-12 14:50:44 +00:00
|
|
|
class WXDLLEXPORT wxBitmap;
|
1999-11-24 12:30:56 +00:00
|
|
|
class WXDLLEXPORT wxPalette;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Functions for working with DIBs
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// VZ: we have 3 different sets of functions: from bitmap.cpp (wxCreateDIB and
|
|
|
|
// wxFreeDIB), from dib.cpp and from dataobj.cpp - surely there is some
|
|
|
|
// redundancy between them? (FIXME)
|
|
|
|
|
|
|
|
// defined in bitmap.cpp
|
|
|
|
extern bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
|
|
|
|
HPALETTE hPal, LPBITMAPINFO* lpDIBHeader);
|
|
|
|
extern void wxFreeDIB(LPBITMAPINFO lpDIBHeader);
|
|
|
|
|
|
|
|
// defined in ole/dataobj.cpp
|
|
|
|
extern size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap);
|
|
|
|
extern wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi);
|
|
|
|
|
|
|
|
// the rest is defined in dib.cpp
|
1999-11-12 14:50:44 +00:00
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
// Save (device dependent) wxBitmap as a DIB
|
1999-11-24 12:30:56 +00:00
|
|
|
bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap = NULL);
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
// Load device independent bitmap into device dependent bitmap
|
1999-11-26 15:26:26 +00:00
|
|
|
wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **colourmap = NULL);
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
// Load into existing bitmap;
|
1999-11-26 16:29:54 +00:00
|
|
|
bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal = NULL);
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-10-04 11:39:13 +00:00
|
|
|
HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
|
|
|
|
BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
|
|
|
|
HANDLE wxReadDIB2(LPTSTR lpFileName);
|
|
|
|
LPSTR wxFindDIBBits (LPSTR lpbi);
|
|
|
|
HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
#endif // _WX_DIB_H_
|
1999-10-24 19:50:17 +00:00
|
|
|
|