This reference page is linked to from the following overview topics: Aspect Ratio, Bitmap Gamma Overview, Error Reporting, Automatic Gamma Correction Best Practices, Changing Bitmap Texture Map Gamma, SDK Changes for Automatic Gamma Correction, Principal Bitmap Classes, Creating Bitmaps, Loading Bitmaps, Saving Bitmaps, Multi-frame Files, Custom Bitmap Properties, Memory Management for Plug-ins that Work with Bitmaps.
#include <bitmap.h>
Information about an image file or in-memory bitmap, including settings for loading/saving, gamma, etc.
Public Member Functions |
|
BMMExport | BitmapInfo () |
BMMExport | BitmapInfo (const MCHAR *n) |
BMMExport | BitmapInfo (const MaxSDK::AssetManagement::AssetUser &asset) |
BMMExport | BitmapInfo (const BitmapInfo &bi) |
BMMExport | ~BitmapInfo () |
BMMExport DWORD | Flags () |
BMMExport DWORD | SetFlags (DWORD f) |
BMMExport DWORD | ResetFlags (DWORD f) |
BMMExport BOOL | TestFlags (DWORD f) |
BMMExport WORD | Width () |
BMMExport WORD | Height () |
BMMExport float | Gamma () |
BMMExport float | Aspect () |
BMMExport int | Type () |
BMMExport int | FirstFrame () |
BMMExport int | LastFrame () |
BMMExport int | NumberFrames () |
BMMExport int | CurrentFrame () |
BMMExport WORD | SequenceOutBound () |
BMMExport const MCHAR * | Name () const |
Returns the currently set path of the image
file. |
|
BMMExport MaxSDK::Util::Path | GetPathEx () const |
Returns the currently set path of the image
file. |
|
BMMExport const MCHAR * | Filename () |
BMMExport const MCHAR * | Device () |
BMMExport BOOL | CompareName (BitmapInfo *bi) |
BMMExport void | CopyImageInfo (BitmapInfo *from) |
BMMExport int | SetFirstFrame (int m) |
BMMExport int | SetLastFrame (int s) |
BMMExport int | SetCurrentFrame (int v) |
BMMExport WORD | SetSequenceOutBound (WORD c) |
BMMExport WORD | SetWidth (WORD s) |
BMMExport WORD | SetHeight (WORD u) |
BMMExport float | SetGamma (float c) |
BMMExport float | SetAspect (float k) |
BMMExport int | SetType (int s) |
BMMExport void | SetPath (const MaxSDK::Util::Path &path) |
Set the path to the image file. |
|
BMMExport const MCHAR * | SetName (const MCHAR *n) |
Set the path to the image file. |
|
BMMExport
const MaxSDK::AssetManagement::AssetUser & |
GetAsset () const |
returns this bitmap's asset |
|
BMMExport void | SetAsset (const MaxSDK::AssetManagement::AssetUser &assetUser) |
sets this bitmap's asset |
|
BMMExport const MCHAR * | SetDevice (const MCHAR *d) |
Sets the device name. |
|
BMMExport WORD | CustWidth () |
BMMExport WORD | CustHeight () |
BMMExport void | SetCustWidth (WORD w) |
BMMExport void | SetCustHeight (WORD h) |
BMMExport int | StartFrame () |
BMMExport int | EndFrame () |
BMMExport void | SetStartFrame (int s) |
BMMExport void | SetEndFrame (int e) |
BMMExport void | SetCustomX (int x) |
BMMExport void | SetCustomY (int y) |
BMMExport int | GetCustomX () |
BMMExport int | GetCustomY () |
BMMExport void | SetCustomGamma (float g) |
BMMExport float | GetCustomGamma () |
BMMExport float | GetEffectiveGamma () |
BMMExport void | SetCustomStep (int s) |
BMMExport int | GetCustomStep () |
BMMExport void | SetPresetAlignment (int p) |
BMMExport int | GetPresetAlignment () |
BMMExport DWORD | GetCustomFlags () |
BMMExport void | SetCustomFlag (DWORD f) |
BMMExport void | ResetCustomFlag (DWORD f) |
BMMExport BOOL | TestCustomFlags (DWORD f) |
BMMExport void * | GetPiData () |
Returns the plugin data stored on the
BitmapInfo. |
|
BMMExport void | SetPiData (void *ptr) |
Sets the plugin data stored on the
BitmapInfo. |
|
BMMExport DWORD | GetPiDataSize () |
Returns the size of the plugin data stored
on the
BitmapInfo. |
|
BMMExport void | SetPiDataSize (DWORD s) |
Sets the reported size of the plugin data
stored on the
BitmapInfo. |
|
BMMExport void | ResetPiData () |
Resets the plugin data stored on the
BitmapInfo. |
|
BMMExport BOOL | AllocPiData (DWORD size) |
Allocates the plugin data memory and set the
plugin data size. |
|
BMMExport BitmapInfo * | GetProxySubject (BOOL create=FALSE) |
Returns the subject info of the proxy. When
create is TRUE, the subject info will be allocated if it was null.
|
|
BMMExport void | ResetProxySubject () |
Deletes the subject info and sets it to
null.
|
|
BMMExport BOOL | AllocProxySubject () |
Creates the subject info.
|
|
BMMExport void * | CreateFmtSpecBlock (void) |
BMMExport void | Copy (const BitmapInfo *from, BOOL copyProxySubject) |
Assignment function. The data members of the
specified
BitmapInfo are copied to this
BitmapInfo, with option to also copy the proxySubject info.
|
|
BMMExport void | Copy (const BitmapInfo *from) |
BMMExport BitmapInfo & | operator= (const BitmapInfo &from) |
BMMExport IOResult | Save (ISave *isave) |
BMMExport IOResult | Load (ILoad *iload) |
BMMExport void | EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags) |
BMMExport BOOL | Validate () |
BMMExport HWND | GetUpdateWindow () |
BMMExport void | SetUpdateWindow (HWND hwnd) |
BMMExport DWORD | GetGChannels () |
BMMExport DWORD | GetDeviceFlags () |
BMMExport BOOL | FixDeviceName () |
Sets the appropriate device name, as derived
from the filename. |
BMMExport BitmapInfo | ( | ) |
BMMExport BitmapInfo | ( | const MCHAR * | n | ) |
BMMExport BitmapInfo | ( | const MaxSDK::AssetManagement::AssetUser & | asset | ) |
BMMExport BitmapInfo | ( | const BitmapInfo & | bi | ) |
BMMExport ~BitmapInfo | ( | ) |
BMMExport DWORD Flags | ( | ) | [inline] |
{ return (flags); }
BMMExport DWORD SetFlags | ( | DWORD | f | ) | [inline] |
{ flags |= f; return (flags); }
BMMExport DWORD ResetFlags | ( | DWORD | f | ) | [inline] |
{ flags &= ~f; return (flags); }
BMMExport BOOL TestFlags | ( | DWORD | f | ) | [inline] |
{ return (flags & f); }
BMMExport WORD Width | ( | ) | [inline] |
{ return (width); }
BMMExport WORD Height | ( | ) | [inline] |
{ return (height); }
BMMExport float Gamma | ( | ) | [inline] |
{ return (gamma); }
BMMExport float Aspect | ( | ) | [inline] |
{ return (aspect);}
BMMExport int Type | ( | ) | [inline] |
{ return (type); }
BMMExport int FirstFrame | ( | ) | [inline] |
{ return (fstart); }
BMMExport int LastFrame | ( | ) | [inline] |
{ return (fend); }
BMMExport int NumberFrames | ( | ) | [inline] |
{ return (fend - fstart + 1); }
BMMExport int CurrentFrame | ( | ) | [inline] |
{ return (fnumber); }
BMMExport WORD SequenceOutBound | ( | ) | [inline] |
{ return (loopflag); }
BMMExport const MCHAR* Name | ( | ) | const |
Returns the currently set path of the image file.
BMMExport MaxSDK::Util::Path GetPathEx | ( | ) | const |
Returns the currently set path of the image file.
BMMExport const MCHAR* Filename | ( | ) |
BMMExport const MCHAR* Device | ( | ) | [inline] |
{ return (const MCHAR *)device; }
BMMExport BOOL CompareName | ( | BitmapInfo * | bi | ) |
BMMExport void CopyImageInfo | ( | BitmapInfo * | from | ) |
BMMExport int SetFirstFrame | ( | int | m | ) | [inline] |
{ int o = fstart; fstart = m; return (o);}
BMMExport int SetLastFrame | ( | int | s | ) | [inline] |
{ int o = fend; fend = s; return (o);}
BMMExport int SetCurrentFrame | ( | int | v | ) | [inline] |
{ int o = fnumber; fnumber = v; return (o);}
BMMExport WORD SetSequenceOutBound | ( | WORD | c | ) | [inline] |
{ WORD o = loopflag; loopflag = c; return (o);}
BMMExport WORD SetWidth | ( | WORD | s | ) | [inline] |
{ WORD o = width; width = s; return (o);}
BMMExport WORD SetHeight | ( | WORD | u | ) | [inline] |
{ WORD o = height; height = u; return (o);}
BMMExport float SetGamma | ( | float | c | ) | [inline] |
{ float o = gamma; gamma = c; return (o);}
BMMExport float SetAspect | ( | float | k | ) | [inline] |
{ float o = aspect; aspect = k; return (o);}
BMMExport int SetType | ( | int | s | ) | [inline] |
{ int o = type; type = s; return (o);}
BMMExport void SetPath | ( | const MaxSDK::Util::Path & | path | ) |
Set the path to the image file.
path | New path for the bitmap. |
BMMExport const MCHAR* SetName | ( | const MCHAR * | n | ) |
Set the path to the image file.
This is a convenience method and calls SetPath under the hood.
n | New path for the bitmap. |
BMMExport const MaxSDK::AssetManagement::AssetUser& GetAsset | ( | ) | const |
returns this bitmap's asset
BMMExport void SetAsset | ( | const MaxSDK::AssetManagement::AssetUser & | assetUser | ) |
BMMExport const MCHAR* SetDevice | ( | const MCHAR * | d | ) |
Sets the device name.
d | - The name to set. |
BMMExport WORD CustWidth | ( | ) | [inline] |
{ return (cwidth); }
BMMExport WORD CustHeight | ( | ) | [inline] |
{ return (cheight); }
BMMExport void SetCustWidth | ( | WORD | w | ) | [inline] |
{ cwidth = w; }
BMMExport void SetCustHeight | ( | WORD | h | ) | [inline] |
{ cheight = h; }
BMMExport int StartFrame | ( | ) | [inline] |
{ return (start); }
BMMExport int EndFrame | ( | ) | [inline] |
{ return (end); }
BMMExport void SetStartFrame | ( | int | s | ) | [inline] |
{ start = s; }
BMMExport void SetEndFrame | ( | int | e | ) | [inline] |
{ end = e; }
BMMExport void SetCustomX | ( | int | x | ) | [inline] |
{ custxpos = x; }
BMMExport void SetCustomY | ( | int | y | ) | [inline] |
{ custypos = y; }
BMMExport int GetCustomX | ( | ) | [inline] |
{ return custxpos; }
BMMExport int GetCustomY | ( | ) | [inline] |
{ return custypos; }
BMMExport void SetCustomGamma | ( | float | g | ) | [inline] |
{ custgamma = g; }
BMMExport float GetCustomGamma | ( | ) | [inline] |
{ return custgamma; }
BMMExport float GetEffectiveGamma | ( | ) |
BMMExport void SetCustomStep | ( | int | s | ) | [inline] |
{ step = s; }
BMMExport int GetCustomStep | ( | ) | [inline] |
{ return step; }
BMMExport void SetPresetAlignment | ( | int | p | ) | [inline] |
{ preset_al = p; }
BMMExport int GetPresetAlignment | ( | ) | [inline] |
{ return preset_al; }
BMMExport DWORD GetCustomFlags | ( | ) | [inline] |
{ return (customflags); }
BMMExport void SetCustomFlag | ( | DWORD | f | ) | [inline] |
{ customflags |= f; }
BMMExport void ResetCustomFlag | ( | DWORD | f | ) | [inline] |
{ customflags &= ~f; }
BMMExport BOOL TestCustomFlags | ( | DWORD | f | ) | [inline] |
{ return (customflags & f); }
BMMExport void* GetPiData | ( | ) | [inline] |
Returns the plugin data stored on the BitmapInfo.
The plugin data is set by BitmapIO class responsible for producing this image. The BitmapIO class stores its image specific data in the plugin data. For example, the avi BitmapIO class stores the compressor name, quality, and keyframe in the plugin data. The BitmapInfo owns the memory associated with the plugin data and will free the memory when deleted.
{ return pidata; }
BMMExport void SetPiData | ( | void * | ptr | ) | [inline] |
Sets the plugin data stored on the BitmapInfo.
This method is not normally called, rather a BitmapIO instance will call AllocPiData(), which will allocate the plugin data memory and set the plugin data size. The BitmapIO will then acquire the pointer to the plugin data memory via GetPiData()
[in] | ptr | Pointer to the plugin data. |
{ pidata = ptr; }
BMMExport DWORD GetPiDataSize | ( | ) | [inline] |
Returns the size of the plugin data stored on the BitmapInfo.
{ return pisize; }
BMMExport void SetPiDataSize | ( | DWORD | s | ) | [inline] |
Sets the reported size of the plugin data stored on the BitmapInfo.
This method is not normally called, rather a BitmapIO instance will call AllocPiData(), which will allocate the plugin data memory and set the plugin data size. The BitmapIO will then acquire the pointer to the plugin data memory via GetPiData()
[in] | s | Reported size of the plugin data. |
{ pisize = s; }
BMMExport void ResetPiData | ( | ) |
Resets the plugin data stored on the BitmapInfo.
Frees existing plugin data memory and sets plugin data size to zero.
BMMExport BOOL AllocPiData | ( | DWORD | size | ) |
Allocates the plugin data memory and set the plugin data size.
Acquire the pointer to the plugin data memory via GetPiData()
[in] | size | Requested size of the plugin data. |
BMMExport void* CreateFmtSpecBlock | ( | void | ) |
BMMExport void Copy | ( | const BitmapInfo * | from, |
BOOL | copyProxySubject | ||
) |
Assignment function. The data members of the specified BitmapInfo are copied to this BitmapInfo, with option to also copy the proxySubject info.
BMMExport void Copy | ( | const BitmapInfo * | from | ) |
BMMExport BitmapInfo& operator= | ( | const BitmapInfo & | from | ) |
BMMExport void EnumAuxFiles | ( | AssetEnumCallback & | assetEnum, |
DWORD | flags | ||
) |
BMMExport BOOL Validate | ( | ) |
BMMExport HWND GetUpdateWindow | ( | ) | [inline] |
{ return hWnd; }
BMMExport void SetUpdateWindow | ( | HWND | hwnd | ) | [inline] |
{ hWnd = hwnd; }
BMMExport DWORD GetGChannels | ( | ) |
BMMExport DWORD GetDeviceFlags | ( | ) |
BMMExport BOOL FixDeviceName | ( | ) |
Sets the appropriate device name, as derived from the filename.