BitmapStorage Class Reference

#include <bitmap.h>

Class Description

See also
Class BitmapManager, Class BitmapInfo, Class Bitmap, Class BitmapIO, Bitmap Error (result) Codes.

Description:
When an image is loaded the buffer that will hold it is an instance of this class. This class provides methods that allow developers to access the image data in a uniform manner even though the underlying storage might be 1-bit, 8-bit, 16-bit, 32-bit or 64-bit. Standard methods are available for getting / putting pixels: Get/PutPixels(), Get/Put16Gray(), Get/Put64Pixels(), Get/PutTruePixels(), Get/PutIndexPixels(), etc.

Since a developer accesses the storage through this standard interface, certain plug-in types may not need to allocate memory for the storage. For example, an image loader that creates an image from scratch (such as a gradient generator). This plug-in would simply derive a new type of BitmapStorage and provide the pixels through the common methods, creating them as requested.

Note: The "<b>Get/PutPixels()</b>" methods of this class access the image a single scanline at a time.

Also note: The following global function may be used by image loader/saver plug-ins to create an instance of BitmapStorage:
+ Inheritance diagram for BitmapStorage:

Public Member Functions

BMMExport BitmapStorage ()
 
virtual BMMExport ~BitmapStorage ()
 
BMMExport float SetGamma (float gam)
 
int HasGamma ()
 
BMMExport void SetHasGamma (BOOL onOff)
 
void UpdateGammaTable ()
 
BMMExport UWORDGetInputGammaTable ()
 
BitmapManagerManager ()
 
int OpenMode ()
 
int Width ()
 
int Height ()
 
float Aspect ()
 
float Gamma ()
 
int Paletted ()
 
int IsDithered ()
 
int PreMultipliedAlpha ()
 
int HasAlpha ()
 
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 UsageCount ()
 
int Type ()
 
int Flags ()
 
void SetFlags (DWORD f)
 
void ClearFlags (DWORD f)
 Clears the given flags. More...
 
virtual BMMExport int MaxRGBLevel ()=0
 
virtual BMMExport int MaxAlphaLevel ()=0
 
virtual BMMExport int IsHighDynamicRange ()=0
 
virtual BMMExport voidGetStoragePtr (int *bmmType)
 
virtual BMMExport voidGetAlphaPtr (int *bmmType)
 
virtual BMMExport void Scale (WORD *, int, WORD *, int)
 
virtual BMMExport void Scale (float *, int, float *, int)
 
virtual BMMExport BOOL GetSRow (WORD *, int, WORD *, int)
 
virtual BMMExport BOOL GetSRow (float *, int, float *, int)
 
virtual BMMExport BOOL PutSRow (WORD *, int, WORD *, int)
 
virtual BMMExport BOOL PutSRow (float *, int, float *, int)
 
virtual BMMExport BOOL GetSCol (WORD *, WORD *, int, int)
 
virtual BMMExport BOOL GetSCol (float *, float *, int, int)
 
virtual BMMExport BOOL PutSCol (WORD *, WORD *, int, int)
 
virtual BMMExport BOOL PutSCol (float *, float *, int, int)
 
virtual BMMExport BOOL ScaleY (Bitmap *, BMM_Color_64 *, WORD *, WORD *, HWND, int cw=0, int ch=0)
 
virtual BMMExport BOOL ScaleY (Bitmap *, BMM_Color_fl *, float *, float *, HWND, int cw=0, int ch=0)
 
virtual BMMExport BOOL ScaleX (Bitmap *, BMM_Color_64 *, WORD *, WORD *, HWND, int cw=0, int ch=0)
 
virtual BMMExport BOOL ScaleX (Bitmap *, BMM_Color_fl *, float *, float *, HWND, int cw=0, int ch=0)
 
virtual BMMExport int StraightCopy (Bitmap *from)=0
 
virtual BMMExport int Get16Gray (int x, int y, int pixels, WORD *ptr)=0
 
virtual BMMExport int Put16Gray (int x, int y, int pixels, WORD *ptr)=0
 
virtual BMMExport int Get16Gray (int x, int y, int pixels, float *ptr)=0
 
virtual BMMExport int Put16Gray (int x, int y, int pixels, float *ptr)=0
 
virtual BMMExport int GetLinearPixels (int x, int y, int pixels, BMM_Color_64 *ptr)=0
 
virtual BMMExport int GetPixels (int x, int y, int pixels, BMM_Color_64 *ptr)=0
 
virtual BMMExport int PutPixels (int x, int y, int pixels, BMM_Color_64 *ptr)=0
 
virtual BMMExport int GetLinearPixels (int x, int y, int pixels, BMM_Color_fl *ptr)=0
 
virtual BMMExport int GetPixels (int x, int y, int pixels, BMM_Color_fl *ptr)=0
 
virtual BMMExport int PutPixels (int x, int y, int pixels, BMM_Color_fl *ptr)=0
 
virtual BMMExport int GetIndexPixels (int x, int y, int pixels, unsigned char *ptr)=0
 
virtual BMMExport int PutIndexPixels (int x, int y, int pixels, unsigned char *ptr)=0
 
virtual BMMExport int Fill (const BMM_Color_fl &fillColor)
 
virtual BMMExport int Fill (const BMM_Color_64 &fillColor)
 
virtual BMMExport int CropImage (int width, int height, BMM_Color_64 fillcolor)=0
 
virtual BMMExport int CropImage (int width, int height, BMM_Color_fl fillcolor)=0
 
virtual BMMExport int CropImage (int width, int height, int fillindex)=0
 
virtual BMMExport int ResizeImage (int width, int height, int newpalette)=0
 
virtual BMMExport int CopyCrop (Bitmap *from, BMM_Color_64 fillcolor)=0
 
virtual BMMExport int CopyCrop (Bitmap *from, BMM_Color_fl fillcolor)=0
 
virtual BMMExport int CopyScaleLow (Bitmap *from)=0
 
virtual BMMExport int CopyScaleHigh (Bitmap *from, HWND hWnd, BMM_Color_64 **buf=NULL, int w=0, int h=0)=0
 
virtual BMMExport int CopyScaleHigh (Bitmap *from, HWND hWnd, BMM_Color_fl **buf=NULL, int w=0, int h=0)=0
 
virtual BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_64 fillcolor, BitmapInfo *bmInfo=NULL)=0
 
virtual BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_fl fillcolor, BitmapInfo *bmInfo=NULL)=0
 
virtual BMMExport int CopyImage (Bitmap *from, int operation, int fillindex)=0
 
virtual BMMExport int GetPalette (int start, int count, BMM_Color_48 *ptr)=0
 
virtual BMMExport int SetPalette (int start, int count, BMM_Color_48 *ptr)=0
 
virtual BMMExport int GetFiltered (float u, float v, float du, float dv, BMM_Color_64 *ptr)=0
 
virtual BMMExport int GetFiltered (float u, float v, float du, float dv, BMM_Color_fl *ptr)=0
 
virtual BMMExport int Allocate (BitmapInfo *pbi, BitmapManager *pmanager, int iOpenMode)=0
 
virtual BMMExport int Connect ()=0
 
virtual BMMExport int Disconnect ()=0
 
virtual BMMExport int MapReady ()=0
 
virtual BMMExport int ClosestColor (BMM_Color_48 color)
 
virtual BMMExport int ClosestColor (int r, int g, int b)
 
virtual BMMExport voidGetChannel (ULONG channelID, ULONG &chanType)
 
GBufferGetGBuffer ()
 
virtual BMMExport ULONG CreateChannels (ULONG channelIDs)
 
virtual BMMExport void DeleteChannels (ULONG channelIDs)
 
virtual BMMExport ULONG ChannelsPresent ()
 
BMMExport RenderInfoAllocRenderInfo ()
 
BMMExport RenderInfoGetRenderInfo ()
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

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 BMMExport void ScaleColor (BMM_Color_64 &out, BMM_Color_fl in)
 
static void ScaleColorA (BMM_Color_64 &out, const BMM_Color_fl &in)
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Public Attributes

BitmapInfo bi
 
MCHARevalString
 

Protected Attributes

int openMode
 
UINT usageCount
 
BitmapManagermanager
 
int flags
 
int type
 
BMM_Color_48 palette [256]
 
int paletteSlots
 
UWORDgammaTable
 
RenderInforendInfo
 
GBuffergbuffer
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Constructor & Destructor Documentation

virtual BMMExport ~BitmapStorage ( )
virtual

Member Function Documentation

BMMExport float SetGamma ( float  gam)
Remarks
Implemented by the System.

Sets the gamma setting to the value passed.
Parameters:
floag gam

The gamma setting to set.
int HasGamma ( )
inline
Remarks
Implemented by the System.

Returns nonzero if the gamma table has been allocated; otherwise 0.
2241 { return (gammaTable!=NULL) ? 1:0; };
#define NULL
Definition: autoptr.h:18
UWORD * gammaTable
Definition: bitmap.h:2220
BMMExport void SetHasGamma ( BOOL  onOff)
Remarks
Implemented by the System.

This method allocates or deallocates the gamma table.
Parameters:
BOOL onOff

If TRUE the gamma table is allocated; otherwise it is deleted.
void UpdateGammaTable ( )
BMMExport UWORD* GetInputGammaTable ( )
Remarks
Implemented by the System.

This methods returns a pointer to a gamma table that can be used for converting pixels using whatever gamma value is appropriate for the storage. It is typically called inside of the GetLinearPixels() method of the particular BitmapStorage subclasses which then use the gamma table to convert pixel values to linear values. Plug-In developers in most cases will not need to call this method directly.
BitmapManager* Manager ( )
inline
Remarks
Implemented by the System.

Returns the bitmap manager for the storage.
2260 { return manager; }
BitmapManager * manager
Definition: bitmap.h:2213
int OpenMode ( )
inline
Remarks
Implemented by the System.

Returns the mode the storage was opened in. See Bitmap Open Mode Types.
2264 { return openMode; }
int openMode
Definition: bitmap.h:2211
int Width ( )
inline
Remarks
Implemented by the System.

Returns the width (horizontal dimension) of the storage's BitmapInfo instance (bi.Width()).
2268 { return bi.Width(); }
BitmapInfo bi
Definition: bitmap.h:2229
BMMExport WORD Width()
Definition: bitmap.h:925
int Height ( )
inline
Remarks
Implemented by the System.

Returns the height (vertical dimension) of the storage's BitmapInfo instance (bi.Height()).
2272 { return bi.Height(); }
BitmapInfo bi
Definition: bitmap.h:2229
BMMExport WORD Height()
Definition: bitmap.h:928
float Aspect ( )
inline
Remarks
Implemented by the System.

Returns the aspect ratio of the storage's BitmapInfo instance (bi.Aspect()).
2276 { return bi.Aspect(); }
BitmapInfo bi
Definition: bitmap.h:2229
BMMExport float Aspect()
Definition: bitmap.h:932
float Gamma ( )
inline
Remarks
Implemented by the System.

Returns the gamma setting of the storage's BitmapInfo instance (bi.Gamma()).
2280 { return bi.Gamma(); }
BMMExport float Gamma()
Definition: bitmap.h:930
BitmapInfo bi
Definition: bitmap.h:2229
int Paletted ( )
inline
Remarks
Implemented by the System.

Determines if the image is paletted. If the image has a palette (indexed color), the number of palette slots used is returned; otherwise zero.
2285 { return (flags & MAP_PALETTED) ? paletteSlots:0; }
int paletteSlots
Definition: bitmap.h:2219
#define MAP_PALETTED
The bitmap uses a palette (not true color).
Definition: bitmap.h:653
int flags
Definition: bitmap.h:2215
int IsDithered ( )
inline
Remarks
Implemented by the System.

Returns the dithered state of the image. If the image is dithered nonzero is returned; otherwise 0,
2289 { return (flags & MAP_DITHERED) ? 1:0; };
int flags
Definition: bitmap.h:2215
#define MAP_DITHERED
The bitmap is dithered.
Definition: bitmap.h:655
int PreMultipliedAlpha ( )
inline
Remarks
Implemented by the System.

Determines if the image has pre-multiplied alpha. If the image has pre-multiplied alpha nonzero is returned; otherwise 0.
2293 { return (flags & MAP_ALPHA_PREMULTIPLIED) ? 1:0; };
int flags
Definition: bitmap.h:2215
#define MAP_ALPHA_PREMULTIPLIED
The bitmap has pre-multiplied alpha.
Definition: bitmap.h:652
int HasAlpha ( )
inline
Remarks
Implemented by the System.

Determines if the image has an alpha channel. If the image has an alpha channel nonzero is returned; otherwise 0.
2297 { return (flags & MAP_HAS_ALPHA) ? 1:0; };
int flags
Definition: bitmap.h:2215
#define MAP_HAS_ALPHA
This flag can be checked from a BitmapInfo instance (bi.Flags()&MAP_HAS_ALPHA)), but not from a Bitma...
Definition: bitmap.h:651
void UseScaleColors ( int  on)
inline
Remarks
Implemented by the System.

Set whether colors are scaled (on) or clamped (off) when converting from BMM_Color_fl to BMM_Color_64.
int flags
Definition: bitmap.h:2215
#define MAP_USE_SCALE_COLORS
Scale colors when high dynamic range values are out of gamut.
Definition: bitmap.h:662
int ScaleColors ( )
inline
Remarks
Implemented by the System.

Returns the last value set by UseScaleColors.
2304 { return (flags & MAP_USE_SCALE_COLORS) ? 1:0; };
int flags
Definition: bitmap.h:2215
#define MAP_USE_SCALE_COLORS
Scale colors when high dynamic range values are out of gamut.
Definition: bitmap.h:662
static void ClampColor ( BMM_Color_64 out,
const BMM_Color_fl in 
)
inlinestatic
Remarks
Implemented by the System.

Converts in to out clamping the RGB components to 0 to 65535. The alpha component is not copied.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
2313 { out.r = in.clipColor(in.r); out.g = in.clipColor(in.g); out.b = in.clipColor(in.b); }
WORD r
Definition: maxtypes.h:82
float g
Definition: maxtypes.h:92
float b
Definition: maxtypes.h:92
WORD g
Definition: maxtypes.h:82
WORD b
Definition: maxtypes.h:82
float r
Storage for the floating point color information.
Definition: maxtypes.h:92
static WORD clipColor(float c)
Definition: maxtypes.h:100
static void ClampColorA ( BMM_Color_64 out,
const BMM_Color_fl in 
)
inlinestatic
Remarks
Implemented by the System.

Converts in to out clamping the RGB components to 0 to 65535.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
2321 { ClampColor(out, in); out.a = in.clipColor(in.a); }
float a
Definition: maxtypes.h:92
WORD a
Definition: maxtypes.h:82
static WORD clipColor(float c)
Definition: maxtypes.h:100
static void ClampColor(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2313
static BMMExport void ScaleColor ( BMM_Color_64 out,
BMM_Color_fl  in 
)
static
Remarks
Implemented by the System.

Converts in to out clamping the RGB components to 0 to 65535. The alpha component is not copied.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
static void ScaleColorA ( BMM_Color_64 out,
const BMM_Color_fl in 
)
inlinestatic
Remarks
Implemented by the System.

Converts in to out clamping the RGB components to 0 to 65535.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
2338 { ScaleColor(out, in); out.a = in.clipColor(in.a); }
float a
Definition: maxtypes.h:92
static BMMExport void ScaleColor(BMM_Color_64 &out, BMM_Color_fl in)
WORD a
Definition: maxtypes.h:82
static WORD clipColor(float c)
Definition: maxtypes.h:100
void ClampScaleColor ( BMM_Color_64 out,
const BMM_Color_fl in 
)
inline
Remarks
Implemented by the System.

Converts in to out, using the value of ScaleColors() to determine the clamping or scaling. The alpha component is not copied.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
2347 { if (ScaleColors()) ScaleColor(out, in); else ClampColor(out, in); }
static BMMExport void ScaleColor(BMM_Color_64 &out, BMM_Color_fl in)
int ScaleColors()
Definition: bitmap.h:2304
static void ClampColor(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2313
void ClampScaleColorA ( BMM_Color_64 out,
const BMM_Color_fl in 
)
inline
Remarks
Implemented by the System.

Converts in to out, using the value of ScaleColors() to determine the clamping or scaling.
Parameters:
BMM_Color_64& out

The result of the conversion.

BMM_Color_fl& in

The value to convert.
2356 { if (ScaleColors()) ScaleColorA(out, in); else ClampColorA(out, in); }
static void ScaleColorA(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2338
static void ClampColorA(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2321
int ScaleColors()
Definition: bitmap.h:2304
int UsageCount ( )
inline
Remarks
Implemented by the System.

Returns the number of times this image is being used in the system.
2360 { return usageCount; };
UINT usageCount
Definition: bitmap.h:2212
int Type ( )
inline
Remarks
Implemented by the System.

Returns the type of bitmap managed by this storage. See Bitmap Types.
2363 { return type; };
int type
Definition: bitmap.h:2216
int Flags ( )
inline
Remarks
Implemented by the System.

Returns the bitmap flags. See Bitmap Flags.
2366 { return flags; };
int flags
Definition: bitmap.h:2215
void SetFlags ( DWORD  f)
inline
Remarks
Implemented by the System.

Sets the specified flag bits. See Bitmap Flags.
Parameters:
DWORD f

The flags to set.
2372 { flags |= f; }
int flags
Definition: bitmap.h:2215
void ClearFlags ( DWORD  f)
inline

Clears the given flags.

virtual BMMExport int MaxRGBLevel ( )
pure virtual
Remarks
This method returns the number of bits per pixel for each color component. For example a 24-bit TARGA has a MaxRGBLevel() of 8 (8 red, 8 green, and 8 blue).
virtual BMMExport int MaxAlphaLevel ( )
pure virtual
Remarks
Returns the number of bits per pixel in the alpha channel.
virtual BMMExport int IsHighDynamicRange ( )
pure virtual
Remarks
Returns nonzero if this storage uses high dynamic range data; otherwise zero. See the Advanced Topics section Working With Bitmaps for details on High Dynamic Range bitmaps.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport void* GetStoragePtr ( int bmmType)
inlinevirtual
Remarks
This method is used to get a pointer to the beginning of the image storage. Not all storage types can return a valid pointer. In those cases, this method will set the passed type to BMM_NO_TYPE and return NULL.
Parameters:
int *bmmType

The type of storage is returned here. See Bitmap Types.
Default Implementation:
{ *bmmType = BMM_NO_TYPE; return (NULL); }
2396 { *bmmType = BMM_NO_TYPE; return (NULL); }
#define NULL
Definition: autoptr.h:18
#define BMM_NO_TYPE
Not allocated yet.
Definition: bitmap.h:129
virtual BMMExport void* GetAlphaPtr ( int bmmType)
inlinevirtual
Remarks
This method will attempt to get a pointer to the beginning of the image alpha storage. Not all storage types can return a valid pointer. In those cases, this call will fail and the user should use some other method described below.
Parameters:
int *bmmType

The type of storage is returned here. See Bitmap Types.
Default Implementation:
{ *bmmType = BMM_NO_TYPE; return (NULL); }

Below are the standard methods for accessing image pixels. Important Note: The following "GetPixels()" methods operate on a single scanline of the image at a time. Thus the number of pixels+x must be less than the width of the image.
2410 { *bmmType = BMM_NO_TYPE; return (NULL); }
#define NULL
Definition: autoptr.h:18
#define BMM_NO_TYPE
Not allocated yet.
Definition: bitmap.h:129
virtual BMMExport void Scale ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual
virtual BMMExport void Scale ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL GetSRow ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual
virtual BMMExport BOOL GetSRow ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL PutSRow ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual
virtual BMMExport BOOL PutSRow ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL GetSCol ( WORD *  ,
WORD *  ,
int  ,
int   
)
virtual
virtual BMMExport BOOL GetSCol ( float *  ,
float *  ,
int  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL PutSCol ( WORD *  ,
WORD *  ,
int  ,
int   
)
virtual
virtual BMMExport BOOL PutSCol ( float *  ,
float *  ,
int  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL ScaleY ( Bitmap ,
BMM_Color_64 ,
WORD *  ,
WORD *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual
virtual BMMExport BOOL ScaleY ( Bitmap ,
BMM_Color_fl ,
float *  ,
float *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport BOOL ScaleX ( Bitmap ,
BMM_Color_64 ,
WORD *  ,
WORD *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual
virtual BMMExport BOOL ScaleX ( Bitmap ,
BMM_Color_fl ,
float *  ,
float *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual
Remarks
Implemented by the System.

This method is used internally.
virtual BMMExport int StraightCopy ( Bitmap from)
pure virtual

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int Get16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Retrieves the specified 16 bit grayscale pixels from the storage. This method operates on a single scanline of the image at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

WORD *ptr

Pointer to storage for the retrieved pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implemented in BitmapStorageHDR.

virtual BMMExport int Put16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Stores the 16 bit grayscale pixels to the specified location in the storage. This method operates on a single scanline of the image at a time.
Parameters:
int x

Destination x location.

int y

Destination y location.

int pixels

Number of pixels to store.

WORD *ptr

Pointer to storage for the pixels.
Returns
Nonzero if pixels were stored; otherwise 0.

Implemented in BitmapStorageHDR.

virtual BMMExport int Get16Gray ( int  x,
int  y,
int  pixels,
float *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Retrieves the specified 16 bit grayscale pixels from the storage. This method operates on a single scanline of the image at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

float *ptr

Pointer to storage for the retrieved pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int Put16Gray ( int  x,
int  y,
int  pixels,
float *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Stores the 16 bit grayscale pixels to the specified location in the storage. This method operates on a single scanline of the image at a time.
Parameters:
int x

Destination x location.

int y

Destination y location.

int pixels

Number of pixels to store.

float *ptr

Pointer to storage for the pixels.
Returns
Nonzero if pixels were stored; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int GetLinearPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
pure virtual
Remarks
This method retrieves the specified 64 bit true color pixels from the storage. Pixels returned from this method are NOT gamma corrected. These have linear gamma (1.0). This method operates on a single scanline of the image at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to store.

BMM_Color_64 *ptr

Pointer to storage for the pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implemented in BitmapStorageHDR.

virtual BMMExport int GetPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
pure virtual
Remarks
Retrieves the specified 64-bit pixel values from the bitmap. Note: This method provides access to pixel data one scanline at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

BMM_Color_64 *ptr

Pointer to storage for the retrieved pixel values. See Structure BMM_Color_64.
Returns
Returns nonzero if pixels were retrieved; otherwise 0. If storage has not been allocated 0 is returned.

Implemented in BitmapStorageHDR.

virtual BMMExport int PutPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
pure virtual
Remarks
Stores the specified 64-bit pixel values into the bitmap's own local storage. The pointer you pass to this method may be freed or reused as soon as the function returns. Note: This method provides access to pixel data one scanline at a time.
Parameters:
int x

Destination x location.

int y

Destination y location.

int pixels

Number of pixels to store.

BMM_Color_64 *ptr

Pixel values to store. See Structure BMM_Color_64.
Returns
Returns nonzero if pixels were stored; otherwise 0. If storage has not been allocated 0 is returned.

Implemented in BitmapStorageHDR.

virtual BMMExport int GetLinearPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
pure virtual
Remarks
This method retrieves the specified 64 bit true color pixels from the storage. Pixels returned from this method are NOT gamma corrected. These have linear gamma (1.0). This method operates on a single scanline of the image at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to store.

BMM_Color_fl *ptr

Pointer to storage for the pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int GetPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
pure virtual
Remarks
Retrieves the specified 64-bit pixel values from the bitmap. Note: This method provides access to pixel data one scanline at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

BMM_Color_fl *ptr

Pointer to storage for the retrieved pixel values.
Returns
Returns nonzero if pixels were retrieved; otherwise 0. If storage has not been allocated 0 is returned.

Implemented in BitmapStorageLDR.

virtual BMMExport int PutPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
pure virtual
Remarks
Stores the specified 64-bit pixel values into the bitmap's own local storage. The pointer you pass to this method may be freed or reused as soon as the function returns. Note: This method provides access to pixel data one scanline at a time.
Parameters:
int x

Destination x location.

int y

Destination y location.

int pixels

Number of pixels to store.

BMM_Color_fl *ptr

Pixel values to store.
Returns
Returns nonzero if pixels were stored; otherwise 0. If storage has not been allocated 0 is returned.

Implemented in BitmapStorageLDR.

virtual BMMExport int GetIndexPixels ( int  x,
int  y,
int  pixels,
unsigned char *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Retrieves the specified index color pixels from the storage. This is used to retrieve pixels from a paletted image. This method operates on a single scanline of the image at a time.
Parameters:
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

unsigned char *ptr

Pointer to storage for the pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int PutIndexPixels ( int  x,
int  y,
int  pixels,
unsigned char *  ptr 
)
pure virtual
Remarks
Implemented by the System.

Stores the index color pixels to the specified location in the storage. This method operates on a single scanline of the image at a time.
Parameters:
int x

Destination x location.

int y

Destination y location.

int pixels

Number of pixels to store.

unsigned char *ptr

Pointer to the pixels to store.
Returns
Nonzero if pixels were stored; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int Fill ( const BMM_Color_fl fillColor)
virtual
virtual BMMExport int Fill ( const BMM_Color_64 fillColor)
virtual
virtual BMMExport int CropImage ( int  width,
int  height,
BMM_Color_64  fillcolor 
)
pure virtual
Remarks
Adjusts the bitmap size to the specified dimensions. The image is not resized to fit; it is cropped or filled with fillcolor pixels to accommodate the new size.
Parameters:
int width

The new horizontal size for the bitmap.

int height

The new vertical size for the bitmap.

BMM_Color_64 fillcolor

If the bitmap's new size is bigger than its current size, this is the color used to fill the new pixels. See Structure BMM_Color_64.
Returns
Nonzero if the image was cropped; otherwise 0.

Implemented in BitmapStorageHDR.

virtual BMMExport int CropImage ( int  width,
int  height,
BMM_Color_fl  fillcolor 
)
pure virtual
Remarks
Adjusts the bitmap size to the specified dimensions. The image is not resized to fit; it is cropped or filled with fillcolor pixels to accommodate the new size.
Parameters:
int width

The new horizontal size for the bitmap.

int height

The new vertical size for the bitmap.

BMM_Color_fl fillcolor

If the bitmap's new size is bigger than its current size, this is the color used to fill the new pixels. See Structure BMM_Color_fl.
Returns
Nonzero if the image was cropped; otherwise 0.

Implemented in BitmapStorageLDR.

virtual BMMExport int CropImage ( int  width,
int  height,
int  fillindex 
)
pure virtual
Remarks
Adjusts the bitmap size to the specified dimensions. The image is not resized to fit; it is cropped or filled with fillindex pixels to accommodate the new size.
Parameters:
int width

The new horizontal size for the bitmap.

int height

The new vertical size for the bitmap.

int fillindex

If the bitmap's new size is bigger than its current size, this is the color used to fill the new pixels.
Returns
Nonzero if the image was cropped; otherwise 0.

Implemented in BitmapStorageHDR.

virtual BMMExport int ResizeImage ( int  width,
int  height,
int  newpalette 
)
pure virtual
Remarks
This method is no longer used.
virtual BMMExport int CopyCrop ( Bitmap from,
BMM_Color_64  fillcolor 
)
pure virtual
Remarks
Copies the specified bitmap to this storage. The image is cropped to fit.
Parameters:
Bitmap *from

The bitmap to copy to this bitmap.

BMM_Color_64 fillcolor

The color to use if the source image is smaller than the destination image. See Structure BMM_Color_64.
Returns
Nonzero if the copy/crop was performed; otherwise zero.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyCrop ( Bitmap from,
BMM_Color_fl  fillcolor 
)
pure virtual
Remarks
Copies the specified bitmap to this storage. The image is cropped to fit.
Parameters:
Bitmap *from

The bitmap to copy to this bitmap.

BMM_Color_fl fillcolor

The color to use if the source image is smaller than the destination image. See Structure BMM_Color_fl.
Returns
Nonzero if the copy/crop was performed; otherwise zero.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyScaleLow ( Bitmap from)
pure virtual
Remarks
Implemented by the System.

This method copies the specified bitmap to this storage. The source bitmap is scaled to fit using a lower quality but faster algorithm than CopyScaleHigh().This is an internal function implemented within BMM.DLL for copying bitmaps back and forth. If a developer creates new storage type, they will automatically get these copy functions as these are implemented in the base class.
Parameters:
Bitmap *from

The source bitmap.
Returns
Nonzero if the copy/scale was performed; otherwise zero.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_64 **  buf = NULL,
int  w = 0,
int  h = 0 
)
pure virtual
Remarks
Implemented by the System.

This method copies the specified bitmap to this storage. The source bitmap is scaled to fit using a higher quality but slower algorithm than CopyScaleLow(). This is an internal function implemented within BMM.DLL for copying bitmaps back and forth. If a developer creates new storage type, they will automatically get these copy functions as these are implemented in the base class.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_fl **  buf = NULL,
int  w = 0,
int  h = 0 
)
pure virtual
Remarks
Implemented by the System.

This method copies the specified bitmap to this storage. The source bitmap is scaled to fit using a higher quality but slower algorithm than CopyScaleLow(). This is an internal function implemented within BMM.DLL for copying bitmaps back and forth. If a developer creates new storage type, they will automatically get these copy functions as these are implemented in the base class.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
BMM_Color_64  fillcolor,
BitmapInfo bmInfo = NULL 
)
pure virtual
Remarks
Copies the specified bitmap to this storage. The image is cropped or resized as specified.
Parameters:
Bitmap *from

The source bitmap.

int operation

The type of copy to perform:

COPY_IMAGE_CROP

Copy image to current map size using cropping if necessary.

COPY_IMAGE_RESIZE_LO_QUALITY

Resize the source image to the destination map size (draft quality).

COPY_IMAGE_RESIZE_HI_QUALITY

Resize source image to the destination map size (final quality).

COPY_IMAGE_USE_CUSTOM

Resize based on the Image Input Options (BitmapInfo *).

BMM_Color_64 fillcolor

Vacant areas of the bitmap are filled with fillcolor pixels if the operation specified is COPY_IMAGE_CROP and one of the source bitmap dimensions is less than the size of this bitmap. See Structure BMM_Color_64.

BitmapInfo *bmInfo

When using custom options (resize to fit, positioning, etc.) this is how the flags are passed down to the Bitmap Manager. This is an optional argument – for simple copy operations, *bmInfo can default to NULL. If present, the code checks the option flags and acts accordingly.
Returns
Nonzero if the copy was performed; otherwise 0.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
BMM_Color_fl  fillcolor,
BitmapInfo bmInfo = NULL 
)
pure virtual
Remarks
Copies the specified bitmap to this storage. The image is cropped or resized as specified.
Parameters:
Bitmap *from

The source bitmap.

int operation

The type of copy to perform:

COPY_IMAGE_CROP

Copy image to current map size using cropping if necessary.

COPY_IMAGE_RESIZE_LO_QUALITY

Resize the source image to the destination map size (draft quality).

COPY_IMAGE_RESIZE_HI_QUALITY

Resize source image to the destination map size (final quality).

COPY_IMAGE_USE_CUSTOM

Resize based on the Image Input Options (BitmapInfo *).

BMM_Color_fl fillcolor

Vacant areas of the bitmap are filled with fillcolor pixels if the operation specified is COPY_IMAGE_CROP and one of the source bitmap dimensions is less than the size of this bitmap. See Structure BMM_Color_fl.

BitmapInfo *bmInfo

When using custom options (resize to fit, positioning, etc.) this is how the flags are passed down to the Bitmap Manager. This is an optional argument – for simple copy operations, *bmInfo can default to NULL. If present, the code checks the option flags and acts accordingly.
Returns
Nonzero if the copy was performed; otherwise 0.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
int  fillindex 
)
pure virtual
Remarks
Copies the specified bitmap to this storage.
Parameters:
Bitmap *from

The source bitmap.

int operation

The type of copy to perform.

COPY_IMAGE_CROP

Copy image to current map size using cropping if necessary.

COPY_IMAGE_RESIZE_LO_QUALITY

Resize the source image to the destination map size (draft quality).

COPY_IMAGE_RESIZE_HI_QUALITY

Resize source image to destination map size (final quality).

COPY_IMAGE_USE_CUSTOM

Resize based on the Image Input Options (BitmapInfo *).

int fillindex

Vacant areas of the bitmap are filled with fillindex pixels if the operation specified is COPY_IMAGE_CROP and one of the source bitmap dimensions is less than the size of this bitmap.
Returns
Nonzero if the copy was performed; otherwise 0.

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

virtual BMMExport int GetPalette ( int  start,
int  count,
BMM_Color_48 ptr 
)
pure virtual
Remarks
Retrieves the specified portion of the palette of this storage.
Parameters:
int start

Zero based index of the first palette entry to retrieve.

int count

Number of palette entries to retrieve.

BMM_Color_48 *ptr

Points to storage for the palette values. See Structure BMM_Color_48.
Returns
Nonzero if the palette was retrieved; otherwise 0.
virtual BMMExport int SetPalette ( int  start,
int  count,
BMM_Color_48 ptr 
)
pure virtual
Remarks
Sets the specified portion of the palette for this storage.
Parameters:
int start

First palette index entry to store.

int count

Number of palette entries to store.

BMM_Color_48 *ptr

Points to storage for the palette values. See Structure BMM_Color_48.
Returns
Nonzero if the palette was stored; otherwise 0.
Sample Code:
From samples/images/bmp/bmp.cpp
//-- Read 4 bit Palette ------------------------------------
if (!bmi.biClrUsed)
bmi.biClrUsed = 16;
rgb = (RGBQUAD *)malloc(bmi.biClrUsed * sizeof(RGBQUAD));
if (!rgb)
goto memory_error_out;
pal = (BMM_Color_48 *)malloc(bmi.biClrUsed * sizeof(BMM_Color_48));
if (!pal)
goto memory_error_out;
if (fread(rgb,sizeof(RGBQUAD),bmi.biClrUsed,file.stream) != bmi.biClrUsed)
goto io_error_out;
for (j = 0; j < (int)bmi.biClrUsed; j++)
{
pal[j].r = rgb[j].rgbRed << 8;
pal[j].g = rgb[j].rgbGreen << 8;
pal[j].b = rgb[j].rgbBlue << 8;
}
s->SetPalette(0,bmi.biClrUsed,pal);
free(pal);
free(rgb);
pal = NULL;
rgb = NULL;
//-- Read Image (4 Bits) -----------------------------
w = fbi->Width();
wb = ( ((fbi->Width()+1)/2)+ 3) & ~3; // width must be multiple of 4
h = fbi->Height() - 1;
p = (BYTE *)malloc(wb);
b4 = (BYTE *)malloc(w);
if (!p || !b4)
goto memory_error_out;
do
{
pixels = fread(p,1,wb,file.stream);
if (pixels != wb && pixels != 0)
goto io_error_out;
if (pixels)
{
// -- the 4bit buffer p has two pixels per byte.
// -- convert it to 8 bit buffer b8 that has one pixel per byte
for(j=0;j<w;j++)
{
b4[j] = (j%2) ? (p[j/2] & 0x0f) : (p[j/2] >> 4);
}
s->PutIndexPixels(0,(h - rows),w,b4);
rows++;
if (rows>h) break;
}
//-- Progress Report
if (fbi->GetUpdateWindow())
SendMessage(fbi->GetUpdateWindow(),BMM_PROGRESS,rows,h);
} while (pixels);
break;
virtual BMMExport int GetFiltered ( float  u,
float  v,
float  du,
float  dv,
BMM_Color_64 ptr 
)
pure virtual
Remarks
This method uses summed area table or pyramidal filtering to compute an averaged color over a specified area.
Parameters:
float u, float v

The location in the bitmap to filter. These values go from 0.0 to 1.0 across the size of the bitmap.

float du, float dv

The size of the rectangle to sample. These values go from 0.0 to 1.0 across the size of the bitmap.

BMM_Color_64 *ptr

The result is returned here - the average over the specified area. See Structure BMM_Color_64.

Implemented in BitmapStorageHDR.

virtual BMMExport int GetFiltered ( float  u,
float  v,
float  du,
float  dv,
BMM_Color_fl ptr 
)
pure virtual
Remarks
This method uses summed area table or pyramidal filtering to compute an averaged color over a specified area and outputs to a floating point color structure.
Parameters:
float u, float v

The location in the bitmap to filter. These values go from 0.0 to 1.0 across the size of the bitmap.

float du, float dv

The size of the rectangle to sample. These values go from 0.0 to 1.0 across the size of the bitmap.

BMM_Color_fl *ptr

The result is returned here - the average over the specified area.

Implemented in BitmapStorageLDR.

virtual BMMExport int Allocate ( BitmapInfo pbi,
BitmapManager pmanager,
int  iOpenMode 
)
pure virtual
Remarks
Implemented by the System.

This method is called to allocate image storage.
Parameters:
BitmapInfo *pbi

Points to an instance of the BitmapInfo class describing the properties of the bitmap.

BitmapManager *pmanager

Points to the BitmapManager for the bitmap.

int iOpenMode

See Bitmap Open Mode Types.
Returns
Nonzero if storage was allocated; otherwise 0.
virtual BMMExport int Connect ( )
pure virtual
virtual BMMExport int Disconnect ( )
pure virtual
virtual BMMExport int MapReady ( )
pure virtual
virtual BMMExport int ClosestColor ( BMM_Color_48  color)
virtual
virtual BMMExport int ClosestColor ( int  r,
int  g,
int  b 
)
virtual
virtual BMMExport void* GetChannel ( ULONG  channelID,
ULONG &  chanType 
)
inlinevirtual
Remarks
Returns a pointer to specified geometry/graphics buffer channel, and determines its pixel depth.
Parameters:
ULONG channelID

The channel to return a pointer to. See Image (G-Buffer) Channels.

ULONG& chanType

The type of the returned channel. One of the following values:

BMM_CHAN_TYPE_UNKNOWN

Channel not of a known type.

BMM_CHAN_TYPE_1

1 bit per pixel

BMM_CHAN_TYPE_8

1 byte per pixel

BMM_CHAN_TYPE_16

1 word per pixel

BMM_CHAN_TYPE_32

2 words per pixel

BMM_CHAN_TYPE_48

3 words per pixel

BMM_CHAN_TYPE_64

4 words per pixel

BMM_CHAN_TYPE_96

6 words per pixel
Default Implementation:
{ return NULL;}
2896 { return gbuffer?gbuffer->GetChannel(channelID, chanType):NULL;}
#define NULL
Definition: autoptr.h:18
virtual void * GetChannel(ULONG channelID, ULONG &chanType)=0
GBuffer * gbuffer
Definition: bitmap.h:2223
GBuffer* GetGBuffer ( )
inline
Remarks
Returns a pointer to the G-Buffer associated with this storage.
2900 { return gbuffer; }
GBuffer * gbuffer
Definition: bitmap.h:2223
virtual BMMExport ULONG CreateChannels ( ULONG  channelIDs)
virtual
Remarks
Create the specified channels.
Parameters:
ULONG channelIDs

Specifies the channels to create. See Image (G-Buffer) Channels.
Returns
The channels that are present.
Default Implementation:
{ return 0;}
virtual BMMExport void DeleteChannels ( ULONG  channelIDs)
inlinevirtual
Remarks
Delete the specified channels.
Parameters:
ULONG channelIDs

Specifies the channels to delete. See Image (G-Buffer) Channels.
2917 { if (gbuffer) gbuffer->DeleteChannels(channelIDs); }
GBuffer * gbuffer
Definition: bitmap.h:2223
virtual void DeleteChannels(ULONG channelMask)=0
virtual BMMExport ULONG ChannelsPresent ( )
inlinevirtual
Remarks
Returns the channels that are present. See Image (G-Buffer) Channels.
Default Implementation:
{ return 0; }
2923 { return gbuffer?gbuffer->ChannelsPresent():0; }
virtual ULONG ChannelsPresent()=0
GBuffer * gbuffer
Definition: bitmap.h:2223
BMMExport RenderInfo* AllocRenderInfo ( )
Remarks
Output bitmaps can get an instance of the class RenderInfo, which is written by the renderer. This method will allocate an instance only if a RenderInfo doesn't yet exist.
Returns
A pointer to a RenderInfo. See Class RenderInfo.
BMMExport RenderInfo* GetRenderInfo ( )
Remarks
Returns a RenderInfo pointer. See Class RenderInfo.

Member Data Documentation

int openMode
protected
UINT usageCount
protected
BitmapManager* manager
protected
int flags
protected
int type
protected
BMM_Color_48 palette[256]
protected
int paletteSlots
protected
UWORD* gammaTable
protected
RenderInfo* rendInfo
protected
GBuffer* gbuffer
protected
MCHAR* evalString