This reference page is linked to from the following overview topics: Principal Bitmap Classes, Creating Bitmaps, Loading Bitmaps, Saving Bitmaps, Multi-frame Files, Resolution / Palettes / Pixel Storage Topics, Dithering and Filtering, Aspect Ratio, Gamma Preferences, Bitmap Gamma Overview.
#include <bitmap.h>
Public Member Functions |
|
BitmapManager * | Manager () |
BMMExport int | Create (BitmapInfo *bi) |
BMMExport BOOL | FixDeviceName (BitmapInfo *bi) |
int | MapReady () |
BMMExport void | AddOutput (BitmapIO *out) |
BMMExport void | RemoveOutput (BitmapIO *out, BOOL deleteOutput=TRUE) |
BMMExport BitmapIO * | FindOutput (BitmapInfo *bi) |
BMMExport PAVIFILE | GetPaviFile (BitmapInfo *bi) |
void * | GetVFBData () |
void | SetVFBData (void *vfb) |
BMMExport void | DeleteThis () |
DWORD | Flags () |
void | SetFlag (DWORD flag) |
void | ToggleFlag (DWORD flag) |
void | ClearFlag (DWORD flag) |
int | Width () |
int | Height () |
float | Aspect () |
float | Gamma () |
int | Paletted () |
int | IsDithered () |
int | PreMultipliedAlpha () |
int | HasAlpha () |
int | IsHighDynamicRange () |
int | MaxRGBLevel () |
int | MaxAlphaLevel () |
void | UseScaleColors (int on) |
int | ScaleColors () |
void | ClampScaleColor (BMM_Color_64 &out, const BMM_Color_fl &in) |
void | ClampScaleColorA (BMM_Color_64 &out, const BMM_Color_fl &in) |
int | Put16Gray (int x, int y, int pixels, WORD *ptr) |
int | Put16Gray (int x, int y, int pixels, float *ptr) |
void * | GetStoragePtr (int *type) |
void * | GetAlphaPtr (int *type) |
int | Get16Gray (int x, int y, int pixels, WORD *ptr) |
int | Get16Gray (int x, int y, int pixels, float *ptr) |
int | GetPixels (int x, int y, int pixels, BMM_Color_64 *ptr) |
int | GetPixels (int x, int y, int pixels, BMM_Color_fl *ptr) |
BMMExport int | PutPixels (int x, int y, int pixels, BMM_Color_64 *ptr) |
BMMExport int | PutPixels (int x, int y, int pixels, BMM_Color_fl *ptr) |
int | GetLinearPixels (int x, int y, int pixels, BMM_Color_64 *ptr) |
int | GetLinearPixels (int x, int y, int pixels, BMM_Color_fl *ptr) |
int | GetIndexPixels (int x, int y, int pixels, BYTE *ptr) |
int | PutIndexPixels (int x, int y, int pixels, BYTE *ptr) |
int | CropImage (int width, int height, BMM_Color_64 fillcolor) |
int | CropImage (int width, int height, BMM_Color_fl fillcolor) |
int | CropImage (int width, int height, int fillindex) |
int | ResizeImage (int width, int height, int newpalette) |
int | CopyImage (Bitmap *from, int operation, BMM_Color_64 fillcolor, BitmapInfo *bi=NULL) |
int | CopyImage (Bitmap *from, int operation, BMM_Color_fl fillcolor, BitmapInfo *bi=NULL) |
int | CopyImage (Bitmap *from, int operation, int fillindex) |
int | GetPalette (int start, int count, BMM_Color_48 *ptr) |
int | SetPalette (int start, int count, BMM_Color_48 *ptr) |
BMMExport void | FilmGrain (float grain, BOOL mask, PBITMAP_FX_CALLBACK callback=NULL, void *param=NULL) |
void * | GetChannel (ULONG channelID, ULONG &chanType) |
GBuffer * | GetGBuffer () |
ULONG | CreateChannels (ULONG channelIDs) |
void | DeleteChannels (ULONG channelIDs) |
ULONG | ChannelsPresent () |
RenderInfo * | GetRenderInfo () |
RenderInfo * | AllocRenderInfo () |
BMMExport BOOL | PrepareGChannels (BitmapInfo *bi) |
BMMExport BOOL | PrepareGChannels (DWORD channels) |
BMMExport int | GetFiltered (float u, float v, float du, float dv, BMM_Color_64 *ptr) |
BMMExport int | GetFiltered (float u, float v, float du, float dv, BMM_Color_fl *ptr) |
BMMExport int | SetDither (UINT ditherType) |
BMMExport int | SetFilter (UINT filterType) |
int | HasFilter () |
BitmapFilter * | Filter () |
BMMExport int | SetStorage (BitmapStorage *storage) |
BitmapStorage * | Storage () |
void | NullStorage () |
BMMExport PBITMAPINFO | ToDib (int depth=24, UWORD *gam=NULL, BOOL dither=FALSE, BOOL displayGamma=FALSE) |
BMMExport BOOL | FromDib (PBITMAPINFO pbmi) |
BMMExport BMMRES | OpenOutput (BitmapInfo *bi) |
BMMExport BMMRES | Write (BitmapInfo *bi, int frame=BMM_SINGLEFRAME) |
BMMExport BMMRES | WriteAll (int frame=BMM_SINGLEFRAME) |
BMMExport int | Close (BitmapInfo *bi, int flag=BMM_CLOSE_COMPLETE) |
BMMExport int | CloseAll (int flag=BMM_CLOSE_COMPLETE) |
BMMExport int | Display (MCHAR *title=NULL, int position=BMM_CN, BOOL autonomous=FALSE, BOOL savebutton=TRUE, CropCallback *crop=NULL, Bitmap *cloneMyVFB=NULL) |
BMMExport int | UnDisplay () |
BMMExport HWND | GetWindow () |
BMMExport void | RefreshWindow (RECT *rect=NULL) |
BMMExport void | SetWindowTitle (MCHAR *title) |
BMMExport void | SetCroppingValues (float u, float v, float w, float h, BOOL placeImage) |
BMMExport BMMRES | GoTo (BitmapInfo *bi) |
BMMExport int | Fill (int r, int g, int b, int alpha) |
BMMExport int | Fill (const BMM_Color_fl &fillColor) |
BMMExport int | Fill (const BMM_Color_64 &fillColor) |
BMMExport void | SetNotify (BitmapNotify *bmnot=NULL) |
BitmapNotify * | GetNotify () |
BMMExport BOOL | IsAutonomousVFB () |
BMMExport INT_PTR | Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) |
DWORD | GetModifyID () |
void | SetModifyID (DWORD m) |
BMMExport void | IncrModifyID () |
BMMExport void | Print (bool silent=false) |
BMMExport void | ShowProgressLine (int y) |
Static Public Member Functions |
|
static void | ClampColor (BMM_Color_64 &out, const BMM_Color_fl &in) |
static void | ClampColorA (BMM_Color_64 &out, const BMM_Color_fl &in) |
static void | ScaleColor (BMM_Color_64 &out, const BMM_Color_fl &in) |
static void | ScaleColorA (BMM_Color_64 &out, const BMM_Color_fl &in) |
Friends |
|
class | BitmapManagerImp |
LRESULT CALLBACK | InputWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
BitmapManager* Manager | ( | ) | [inline] |
{ return manager; };
BMMExport int Create | ( | BitmapInfo * | bi | ) |
BMMExport BOOL FixDeviceName | ( | BitmapInfo * | bi | ) |
int MapReady | ( | ) | [inline] |
{ if (storage) return storage->MapReady(); return 0; };
BMMExport void AddOutput | ( | BitmapIO * | out | ) |
BMMExport void RemoveOutput | ( | BitmapIO * | out, |
BOOL | deleteOutput =
TRUE |
||
) |
BMMExport BitmapIO* FindOutput | ( | BitmapInfo * | bi | ) |
BMMExport PAVIFILE GetPaviFile | ( | BitmapInfo * | bi | ) |
void* GetVFBData | ( | ) | [inline] |
{ return vfbData; }
void SetVFBData | ( | void * | vfb | ) | [inline] |
{ vfbData = vfb; }
BMMExport void DeleteThis | ( | ) |
DWORD Flags | ( | ) | [inline] |
{ return flags; };
void SetFlag | ( | DWORD | flag | ) | [inline] |
{ flags |= flag; };
void ToggleFlag | ( | DWORD | flag | ) | [inline] |
{ flags ^= flag; };
void ClearFlag | ( | DWORD | flag | ) | [inline] |
{ flags &= (~flag); };
int Width | ( | ) | [inline] |
{ if (storage) return storage->Width(); return 0; };
int Height | ( | ) | [inline] |
{ if (storage) return storage->Height(); return 0; };
float Aspect | ( | ) | [inline] |
{ if (storage) return storage->Aspect(); return (float)0.0; };
float Gamma | ( | ) | [inline] |
{ if (storage) return storage->Gamma(); return (float)0.0; };
int Paletted | ( | ) | [inline] |
{ if (storage) return storage->Paletted(); return 0; };
int IsDithered | ( | ) | [inline] |
{ if (storage) return storage->IsDithered(); return 0; };
int PreMultipliedAlpha | ( | ) | [inline] |
{ if (storage) return storage->PreMultipliedAlpha(); return 0; };
int HasAlpha | ( | ) | [inline] |
{ if (storage) return storage->HasAlpha(); return 0; };
int IsHighDynamicRange | ( | ) | [inline] |
{ if (storage) return storage->IsHighDynamicRange(); return 0; };
int MaxRGBLevel | ( | ) | [inline] |
{ if (storage) return storage->MaxRGBLevel(); return 0; };
int MaxAlphaLevel | ( | ) | [inline] |
{ if (storage) return storage->MaxAlphaLevel(); return 0; };
void UseScaleColors | ( | int | on | ) | [inline] |
{ if (storage) storage->UseScaleColors(on); };
int ScaleColors | ( | ) | [inline] |
{ if (storage) return storage->ScaleColors(); return 0; };
static void ClampColor | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline, static] |
{ BitmapStorage::ClampColor(out, in); }
static void ClampColorA | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline, static] |
{ BitmapStorage::ClampColorA(out, in); }
static void ScaleColor | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline, static] |
{ BitmapStorage::ScaleColor(out, in);}
static void ScaleColorA | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline, static] |
{ BitmapStorage::ScaleColorA(out, in);}
void ClampScaleColor | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline] |
{ if (storage) storage->ClampScaleColor(out, in); else ClampColor(out, in); }
void ClampScaleColorA | ( | BMM_Color_64 & | out, |
const BMM_Color_fl & | in | ||
) | [inline] |
{ if (storage) storage->ClampScaleColorA(out, in); else ClampColorA(out, in); }
int Put16Gray | ( | int | x, |
int | y, | ||
int | pixels, | ||
WORD * | ptr | ||
) | [inline] |
{ if (storage) return storage->Put16Gray(x,y,pixels,ptr); return 0; };
int Put16Gray | ( | int | x, |
int | y, | ||
int | pixels, | ||
float * | ptr | ||
) | [inline] |
{ if (storage) return storage->Put16Gray(x,y,pixels,ptr); return 0; };
void* GetStoragePtr | ( | int * | type | ) | [inline] |
{ if (storage) return storage->GetStoragePtr(type); return NULL; };
void* GetAlphaPtr | ( | int * | type | ) | [inline] |
{ if (storage) return storage->GetAlphaPtr(type); return NULL; };
int Get16Gray | ( | int | x, |
int | y, | ||
int | pixels, | ||
WORD * | ptr | ||
) | [inline] |
{ if (storage) return storage->Get16Gray(x,y,pixels,ptr); return 0; };
int Get16Gray | ( | int | x, |
int | y, | ||
int | pixels, | ||
float * | ptr | ||
) | [inline] |
{ if (storage) return storage->Get16Gray(x,y,pixels,ptr); return 0; };
int GetPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_64 * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetPixels(x,y,pixels,ptr); return 0; };
int GetPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_fl * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetPixels(x,y,pixels,ptr); return 0; };
BMMExport int PutPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_64 * | ptr | ||
) |
BMMExport int PutPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_fl * | ptr | ||
) |
int GetLinearPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_64 * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetLinearPixels(x,y,pixels,ptr); return 0; };
int GetLinearPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_fl * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetLinearPixels(x,y,pixels,ptr); return 0; };
int GetIndexPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BYTE * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetIndexPixels(x,y,pixels,ptr); return 0; };
int PutIndexPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BYTE * | ptr | ||
) | [inline] |
{ if (storage) return storage->PutIndexPixels(x,y,pixels,ptr); return 0; };
int CropImage | ( | int | width, |
int | height, | ||
BMM_Color_64 | fillcolor | ||
) | [inline] |
{ if (storage) return storage->CropImage(width,height,fillcolor); return 0; };
int CropImage | ( | int | width, |
int | height, | ||
BMM_Color_fl | fillcolor | ||
) | [inline] |
{ if (storage) return storage->CropImage(width,height,fillcolor); return 0; };
int CropImage | ( | int | width, |
int | height, | ||
int | fillindex | ||
) | [inline] |
{ if (storage) return storage->CropImage(width,height,fillindex); return 0; };
int ResizeImage | ( | int | width, |
int | height, | ||
int | newpalette | ||
) | [inline] |
{ if (storage) return storage->ResizeImage(width,height,newpalette);return 0; };
int CopyImage | ( | Bitmap * | from, |
int | operation, | ||
BMM_Color_64 | fillcolor, | ||
BitmapInfo * | bi = NULL |
||
) | [inline] |
{ if (storage) return storage->CopyImage(from,operation,fillcolor,bi); return 0; };
int CopyImage | ( | Bitmap * | from, |
int | operation, | ||
BMM_Color_fl | fillcolor, | ||
BitmapInfo * | bi = NULL |
||
) | [inline] |
{ if (storage) return storage->CopyImage(from,operation,fillcolor,bi); return 0; };
int CopyImage | ( | Bitmap * | from, |
int | operation, | ||
int | fillindex | ||
) | [inline] |
{ if (storage) return storage->CopyImage(from,operation,fillindex); return 0; };
int GetPalette | ( | int | start, |
int | count, | ||
BMM_Color_48 * | ptr | ||
) | [inline] |
{ if (storage) return storage->GetPalette(start,count,ptr); return 0; };
int SetPalette | ( | int | start, |
int | count, | ||
BMM_Color_48 * | ptr | ||
) | [inline] |
{ if (storage) return storage->SetPalette(start,count,ptr); return 0; };
BMMExport void FilmGrain | ( | float | grain, |
BOOL | mask, | ||
PBITMAP_FX_CALLBACK | callback = NULL , |
||
void * | param = NULL |
||
) |
void* GetChannel | ( | ULONG | channelID, |
ULONG & | chanType | ||
) | [inline] |
{ if (storage) return storage->GetChannel(channelID, chanType); return NULL; }
GBuffer* GetGBuffer | ( | ) | [inline] |
{ return storage? storage->GetGBuffer(): NULL; }
ULONG CreateChannels | ( | ULONG | channelIDs | ) | [inline] |
{ if (storage) return storage->CreateChannels(channelIDs); return 0; }
void DeleteChannels | ( | ULONG | channelIDs | ) | [inline] |
{ if (storage) storage->DeleteChannels(channelIDs); }
ULONG ChannelsPresent | ( | ) | [inline] |
{ if (storage) return storage->ChannelsPresent(); return 0; }
RenderInfo* GetRenderInfo | ( | ) | [inline] |
{ if (storage) return storage->GetRenderInfo(); return NULL; }
RenderInfo* AllocRenderInfo | ( | ) | [inline] |
{ if (storage) return storage->AllocRenderInfo(); return NULL; }
BMMExport BOOL PrepareGChannels | ( | BitmapInfo * | bi | ) |
BMMExport BOOL PrepareGChannels | ( | DWORD | channels | ) |
BMMExport int GetFiltered | ( | float | u, |
float | v, | ||
float | du, | ||
float | dv, | ||
BMM_Color_64 * | ptr | ||
) |
BMMExport int GetFiltered | ( | float | u, |
float | v, | ||
float | du, | ||
float | dv, | ||
BMM_Color_fl * | ptr | ||
) |
BMMExport int SetDither | ( | UINT | ditherType | ) |
BMMExport int SetFilter | ( | UINT | filterType | ) |
int HasFilter | ( | ) | [inline] |
{ return (filter) ? 1:0; };
BitmapFilter* Filter | ( | ) | [inline] |
{ return filter; };
BMMExport int SetStorage | ( | BitmapStorage * | storage | ) |
BitmapStorage* Storage | ( | ) | [inline] |
{ return storage; };
void NullStorage | ( | ) | [inline] |
BMMExport PBITMAPINFO ToDib | ( | int | depth = 24 , |
UWORD * | gam = NULL , |
||
BOOL | dither = FALSE , |
||
BOOL | displayGamma =
FALSE |
||
) |
PBITMAPINFO pDib; pDib = bitmap-\>ToDib(); ...
BMMExport BOOL FromDib | ( | PBITMAPINFO | pbmi | ) |
BMMExport BMMRES OpenOutput | ( | BitmapInfo * | bi | ) |
BMMExport BMMRES Write | ( | BitmapInfo * | bi, |
int | frame =
BMM_SINGLEFRAME |
||
) |
BMMExport BMMRES WriteAll | ( | int | frame =
BMM_SINGLEFRAME |
) |
BMMExport int Close | ( | BitmapInfo * | bi, |
int | flag =
BMM_CLOSE_COMPLETE |
||
) |
BMMExport int CloseAll | ( | int | flag =
BMM_CLOSE_COMPLETE |
) |
BMMExport int Display | ( | MCHAR * | title = NULL , |
int | position = BMM_CN , |
||
BOOL | autonomous =
FALSE , |
||
BOOL | savebutton = TRUE , |
||
CropCallback * | crop = NULL , |
||
Bitmap * | cloneMyVFB =
NULL |
||
) |
BMMExport int UnDisplay | ( | ) |
BMMExport HWND GetWindow | ( | ) |
BMMExport void RefreshWindow | ( | RECT * | rect = NULL |
) |
BMMExport void SetWindowTitle | ( | MCHAR * | title | ) |
BMMExport void SetCroppingValues | ( | float | u, |
float | v, | ||
float | w, | ||
float | h, | ||
BOOL | placeImage | ||
) |
BMMExport BMMRES GoTo | ( | BitmapInfo * | bi | ) |
BMMExport int Fill | ( | int | r, |
int | g, | ||
int | b, | ||
int | alpha | ||
) |
BMMExport int Fill | ( | const BMM_Color_fl & | fillColor | ) |
BMMExport int Fill | ( | const BMM_Color_64 & | fillColor | ) |
BMMExport void SetNotify | ( | BitmapNotify * | bmnot = NULL |
) |
BitmapNotify* GetNotify | ( | ) | [inline] |
{ return bmNotify; }
BMMExport BOOL IsAutonomousVFB | ( | ) |
BMMExport INT_PTR Execute | ( | int | cmd, |
ULONG_PTR | arg1 = 0 , |
||
ULONG_PTR | arg2 = 0 , |
||
ULONG_PTR | arg3 = 0 |
||
) |
DWORD GetModifyID | ( | ) | [inline] |
{ return modifyID; }
void SetModifyID | ( | DWORD | m | ) | [inline] |
{ modifyID = m; }
BMMExport void IncrModifyID | ( | ) |
BMMExport void Print | ( | bool | silent = false |
) |
BMMExport void ShowProgressLine | ( | int | y | ) |
friend class BitmapManagerImp
[friend] |
LRESULT CALLBACK InputWndProc | ( | HWND | hWnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [friend] |