// (c) 1996-2007 Electronic Arts Inc.

/*------------------------------------------------------------------*/
/*																	*/
/*							Bitmap Utilities						*/
/*																	*/
/*						   by Gerry Shaw, EAC						*/
/*																	*/
/*					  Header Module - Jan 08, 1996					*/
/*																	*/
/*------------------------------------------------------------------*/
/*																	*/
/* Version Date   SE History										*/
/* ------- ------ -- -------										*/
/*	  1.00 960108 GS initial version for P2 						*/
/*																	*/
/*------------------------------------------------------------------*/

#ifndef BMPHLP_H
#define BMPHLP_H

#if defined(_MSC_VER)
#pragma once
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include "stdgimex.h"

/****************************************************************/
/*	Dither Defines												*/
/****************************************************************/

#define DITHER_NONE 		0
#define DITHER_STANDARD 	1


/****************************************************************/
/*	Prototypes													*/
/****************************************************************/

GBITMAP* gallocbitmap(int width, int height, int bpp);
	/* allocates empty GBITMAP, gfreebitmap to free */

GBITMAP* copybitmap(GBITMAP* src);
	/* copy src into new GBITMAP, gfreebitmap to free */

GBITMAP* remap8to32(GBITMAP* src);
	/* remap 8bpp src to a 32bpp (8888) GBITMAP, gfreebitmap to free */

GBITMAP* remapto32c(GBITMAP* s, int abits, int rbits, int gbits, int bbits, int dither);
	/* remap s to 32 bpp with given bits per channel, gfree to free */

GBITMAP* remapto32(GBITMAP* s, int bpp, int dither);
	/* remap s to 32 bpp (bpp > 8), gfreebitmap to free */

GBITMAP* remapto8(GBITMAP* s, int bpp, ARGB* pal, char* range, int dither);
	/* remap s to 8 bpp (bpp <= 8), range == "0..255", gfreebitmap to free */

#ifdef __cplusplus
}
#endif
#endif // BMPHLP_H

