gebmutil.h

Description: The following is code from GTest, and not part of the original Genesis3d engine

Source file: …\genesis3d\src\Procedurals\gebmutil.h

Contents:

Types: CreateHBITMAP, CreateFromHBITMAP, SetColor, SmoothBits, SetAlphaFromBrightness, CreateFromFileName, CreateFromFileAndAlphaNames, SetPaletteFromString, CompareBitmaps, MSE2PSNR, PSNR2MSE

Functions:

 

HBITMAP geBitmapUtil_CreateHBITMAP(geBitmap* Bitmap, HWND window, int mip);

// use DeleteObject when done

Return to Contents

geBitmap* geBitmapUtil_CreateFromHBITMAP(HWND window, HBITMAP hbm);

 

Return to Contents

geBoolean geBitmapUtil_SetColor(geBitmap* Bmp, int R, int G, int B, int A);

// sets all of the bitmap to one color
// on palettized, use R=G=B=A= 0 to set all palette indeces to zero

 

Return to Contents

geBoolean geBitmapUtil_SmoothBits(geBitmap_Info* pInfo,void* FmBits,void* ToBits, int radius, geBoolean wrap);

// a convolution filter for linear smoothing
// assembly & fast
// Fm == To is ok
// (btw wrap is slow & not in assembly yet)

 

Return to Contents

geBoolean geBitmapUtil_SetAlphaFromBrightness(geBitmap* Bmp);

 

Return to Contents

geBitmap* geBitmapUtil_CreateFromFileName(const geVFile* BaseFS,const char* BmName);

 

Return to Contents

geBitmap* geBitmapUtil_CreateFromFileAndAlphaNames(const geVFile* BaseFS, const char* BmName, const char* AlphaName);

 

Return to Contents

geBoolean geBitmapUtil_SetPaletteFromString(geBitmap* Bitmap,char** pParams);

// moves pParams past the used palette entries

Return to Contents

geBoolean geBitmapUtil_CompareBitmaps(geBitmap* bm1, geBitmap* bm2, char* IntoStr, double* pMSE);

// compares YUV's

Return to Contents

double geBitmapUtil_MSE2PSNR(double mse);

Return to Contents

double geBitmapUtil_PSNR2MSE(double psnr);

 

Return to Contents

Notes:

 

 

Return to Contents