3ds Max C++ API Reference
BitmapStorage Class Referenceabstract

#include <bitmap.h>

+ 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=nullptr, int w=0, int h=0)=0
 
virtual BMMExport int CopyScaleHigh (Bitmap *from, HWND hWnd, BMM_Color_fl **buf=nullptr, int w=0, int h=0)=0
 
virtual BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_64 fillcolor, BitmapInfo *bmInfo=nullptr)=0
 
virtual BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_fl fillcolor, BitmapInfo *bmInfo=nullptr)=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
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
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...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. 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
 

Detailed 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:

Constructor & Destructor Documentation

◆ BitmapStorage()

◆ ~BitmapStorage()

virtual BMMExport ~BitmapStorage ( )
virtual

Member Function Documentation

◆ SetGamma()

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.

◆ HasGamma()

int HasGamma ( )
inline
Remarks
Implemented by the System.

Returns nonzero if the gamma table has been allocated; otherwise 0.
2245 { return (gammaTable!=nullptr) ? 1:0; };
UWORD * gammaTable
Definition: bitmap.h:2224

◆ SetHasGamma()

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.

◆ UpdateGammaTable()

void UpdateGammaTable ( )

◆ GetInputGammaTable()

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.

◆ Manager()

BitmapManager* Manager ( )
inline
Remarks
Implemented by the System.

Returns the bitmap manager for the storage.
2264 { return manager; }
BitmapManager * manager
Definition: bitmap.h:2217

◆ OpenMode()

int OpenMode ( )
inline
Remarks
Implemented by the System.

Returns the mode the storage was opened in. See Bitmap Open Mode Types
2268 { return openMode; }
int openMode
Definition: bitmap.h:2215

◆ Width()

int Width ( )
inline
Remarks
Implemented by the System.

Returns the width (horizontal dimension) of the storage's BitmapInfo instance (bi.Width()).
2272 { return bi.Width(); }
BMMExport WORD Width() const
Definition: bitmap.h:929
BitmapInfo bi
Definition: bitmap.h:2233

◆ Height()

int Height ( )
inline
Remarks
Implemented by the System.

Returns the height (vertical dimension) of the storage's BitmapInfo instance (bi.Height()).
2276 { return bi.Height(); }
BMMExport WORD Height() const
Definition: bitmap.h:932

◆ Aspect()

float Aspect ( )
inline
Remarks
Implemented by the System.

Returns the aspect ratio of the storage's BitmapInfo instance (bi.Aspect()).
2280 { return bi.Aspect(); }
BMMExport float Aspect() const
Definition: bitmap.h:936

◆ Gamma()

float Gamma ( )
inline
Remarks
Implemented by the System.

Returns the gamma setting of the storage's BitmapInfo instance (bi.Gamma()).
2284 { return bi.Gamma(); }
BMMExport float Gamma() const
Definition: bitmap.h:934

◆ Paletted()

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.
2289 { return (flags & MAP_PALETTED) ? paletteSlots:0; }
int paletteSlots
Definition: bitmap.h:2223
int flags
Definition: bitmap.h:2219
#define MAP_PALETTED
The bitmap uses a palette (not true color).
Definition: bitmap.h:653

◆ IsDithered()

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,
2293 { return (flags & MAP_DITHERED) ? 1:0; };
#define MAP_DITHERED
The bitmap is dithered.
Definition: bitmap.h:655

◆ PreMultipliedAlpha()

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.
2297 { return (flags & MAP_ALPHA_PREMULTIPLIED) ? 1:0; };
#define MAP_ALPHA_PREMULTIPLIED
The bitmap has pre-multiplied alpha.
Definition: bitmap.h:652

◆ HasAlpha()

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.
2301 { return (flags & MAP_HAS_ALPHA) ? 1:0; };
#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

◆ UseScaleColors()

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.
#define MAP_USE_SCALE_COLORS
Scale colors when high dynamic range values are out of gamut.
Definition: bitmap.h:662

◆ ScaleColors()

int ScaleColors ( )
inline
Remarks
Implemented by the System.

Returns the last value set by UseScaleColors.
2308 { return (flags & MAP_USE_SCALE_COLORS) ? 1:0; };

◆ ClampColor()

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.
2317 { out.r = in.clipColor(in.r); out.g = in.clipColor(in.g); out.b = in.clipColor(in.b); }
uint16_t b
Definition: maxcolors.h:112
uint16_t r
Definition: maxcolors.h:112
uint16_t g
Definition: maxcolors.h:112
static uint16_t clipColor(float c)
Definition: maxcolors.h:142
float r
Storage for the floating point color information.
Definition: maxcolors.h:128
float b
Definition: maxcolors.h:128
float g
Definition: maxcolors.h:128

◆ ClampColorA()

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.
2325 { ClampColor(out, in); out.a = in.clipColor(in.a); }
static void ClampColor(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2317
uint16_t a
Definition: maxcolors.h:112
float a
Definition: maxcolors.h:128

◆ ScaleColor()

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.

◆ ScaleColorA()

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.
2342 { ScaleColor(out, in); out.a = in.clipColor(in.a); }
static BMMExport void ScaleColor(BMM_Color_64 &out, BMM_Color_fl in)

◆ ClampScaleColor()

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.
2351 { if (ScaleColors()) ScaleColor(out, in); else ClampColor(out, in); }
int ScaleColors()
Definition: bitmap.h:2308

◆ ClampScaleColorA()

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.
2360 { if (ScaleColors()) ScaleColorA(out, in); else ClampColorA(out, in); }
static void ScaleColorA(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2342
static void ClampColorA(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition: bitmap.h:2325

◆ UsageCount()

int UsageCount ( )
inline
Remarks
Implemented by the System.

Returns the number of times this image is being used in the system.
2364 { return usageCount; };
UINT usageCount
Definition: bitmap.h:2216

◆ Type()

int Type ( )
inline
Remarks
Implemented by the System.

Returns the type of bitmap managed by this storage. See Bitmap Types.
2367 { return type; };
int type
Definition: bitmap.h:2220

◆ Flags()

int Flags ( )
inline
Remarks
Implemented by the System.

Returns the bitmap flags. See Bitmap Flags.
2370 { return flags; };

◆ SetFlags()

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.
2376 { flags |= f; }

◆ ClearFlags()

void ClearFlags ( DWORD  f)
inline

Clears the given flags.

◆ MaxRGBLevel()

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).

◆ MaxAlphaLevel()

virtual BMMExport int MaxAlphaLevel ( )
pure virtual
Remarks
Returns the number of bits per pixel in the alpha channel.

◆ IsHighDynamicRange()

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.

◆ GetStoragePtr()

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); }
2400 { *bmmType = BMM_NO_TYPE; return nullptr; }
#define BMM_NO_TYPE
Not allocated yet.
Definition: bitmap.h:129

◆ GetAlphaPtr()

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.
2414 { *bmmType = BMM_NO_TYPE; return nullptr; }

◆ Scale() [1/2]

virtual BMMExport void Scale ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual

◆ Scale() [2/2]

virtual BMMExport void Scale ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.

◆ GetSRow() [1/2]

virtual BMMExport BOOL GetSRow ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual

◆ GetSRow() [2/2]

virtual BMMExport BOOL GetSRow ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.

◆ PutSRow() [1/2]

virtual BMMExport BOOL PutSRow ( WORD *  ,
int  ,
WORD *  ,
int   
)
virtual

◆ PutSRow() [2/2]

virtual BMMExport BOOL PutSRow ( float *  ,
int  ,
float *  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.

◆ GetSCol() [1/2]

virtual BMMExport BOOL GetSCol ( WORD *  ,
WORD *  ,
int  ,
int   
)
virtual

◆ GetSCol() [2/2]

virtual BMMExport BOOL GetSCol ( float *  ,
float *  ,
int  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.

◆ PutSCol() [1/2]

virtual BMMExport BOOL PutSCol ( WORD *  ,
WORD *  ,
int  ,
int   
)
virtual

◆ PutSCol() [2/2]

virtual BMMExport BOOL PutSCol ( float *  ,
float *  ,
int  ,
int   
)
virtual
Remarks
Implemented by the System.

This method is used internally.

◆ ScaleY() [1/2]

virtual BMMExport BOOL ScaleY ( Bitmap ,
BMM_Color_64 ,
WORD *  ,
WORD *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual

◆ ScaleY() [2/2]

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.

◆ ScaleX() [1/2]

virtual BMMExport BOOL ScaleX ( Bitmap ,
BMM_Color_64 ,
WORD *  ,
WORD *  ,
HWND  ,
int  cw = 0,
int  ch = 0 
)
virtual

◆ ScaleX() [2/2]

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.

◆ StraightCopy()

virtual BMMExport int StraightCopy ( Bitmap from)
pure virtual

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

◆ Get16Gray() [1/2]

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.

◆ Put16Gray() [1/2]

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.

◆ Get16Gray() [2/2]

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.

◆ Put16Gray() [2/2]

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.

◆ GetLinearPixels() [1/2]

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.

◆ GetPixels() [1/2]

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.

◆ PutPixels() [1/2]

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.

◆ GetLinearPixels() [2/2]

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.

◆ GetPixels() [2/2]

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.

◆ PutPixels() [2/2]

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.

◆ GetIndexPixels()

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.

◆ PutIndexPixels()

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.

◆ Fill() [1/2]

virtual BMMExport int Fill ( const BMM_Color_fl fillColor)
virtual

◆ Fill() [2/2]

virtual BMMExport int Fill ( const BMM_Color_64 fillColor)
virtual

◆ CropImage() [1/3]

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.

◆ CropImage() [2/3]

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.

◆ CropImage() [3/3]

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.

◆ ResizeImage()

virtual BMMExport int ResizeImage ( int  width,
int  height,
int  newpalette 
)
pure virtual
Remarks
This method is no longer used.

◆ CopyCrop() [1/2]

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.

◆ CopyCrop() [2/2]

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.

◆ CopyScaleLow()

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.

◆ CopyScaleHigh() [1/2]

virtual BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_64 **  buf = nullptr,
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.

◆ CopyScaleHigh() [2/2]

virtual BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_fl **  buf = nullptr,
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.

◆ CopyImage() [1/3]

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
BMM_Color_64  fillcolor,
BitmapInfo bmInfo = nullptr 
)
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.

◆ CopyImage() [2/3]

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
BMM_Color_fl  fillcolor,
BitmapInfo bmInfo = nullptr 
)
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.

◆ CopyImage() [3/3]

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.

◆ GetPalette()

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.

◆ SetPalette()

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;
#define NULL
Definition: autoptr.h:18
#define BMM_PROGRESS
Definition: bitmap.h:694
MAXMEM_EXTERN_C UtilExport int(__cdecl *MAX_heapchk)(void)
48 bit color: 16 bits each for Red, Green, and Blue.
Definition: maxcolors.h:91

◆ GetFiltered() [1/2]

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.

◆ GetFiltered() [2/2]

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.

◆ Allocate()

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.

◆ Connect()

virtual BMMExport int Connect ( )
pure virtual

◆ Disconnect()

virtual BMMExport int Disconnect ( )
pure virtual

◆ MapReady()

virtual BMMExport int MapReady ( )
pure virtual

◆ ClosestColor() [1/2]

virtual BMMExport int ClosestColor ( BMM_Color_48  color)
virtual

◆ ClosestColor() [2/2]

virtual BMMExport int ClosestColor ( int  r,
int  g,
int  b 
)
virtual

◆ GetChannel()

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;}
2900 { return gbuffer ? gbuffer->GetChannel(channelID, chanType) : nullptr; }
GBuffer * gbuffer
Definition: bitmap.h:2227
virtual void * GetChannel(ULONG channelID, ULONG &chanType)=0

◆ GetGBuffer()

GBuffer* GetGBuffer ( )
inline
Remarks
Returns a pointer to the G-Buffer associated with this storage.
2904 { return gbuffer; }

◆ CreateChannels()

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;}

◆ DeleteChannels()

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.
2921 { if (gbuffer) gbuffer->DeleteChannels(channelIDs); }
virtual void DeleteChannels(ULONG channelMask)=0

◆ ChannelsPresent()

virtual BMMExport ULONG ChannelsPresent ( )
inlinevirtual
Remarks
Returns the channels that are present. See Image (G-Buffer) Channels.
Default Implementation:
{ return 0; }
2927 { return gbuffer?gbuffer->ChannelsPresent():0; }
virtual ULONG ChannelsPresent()=0

◆ AllocRenderInfo()

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.

◆ GetRenderInfo()

BMMExport RenderInfo* GetRenderInfo ( )
Remarks
Returns a RenderInfo pointer. See Class RenderInfo.

Member Data Documentation

◆ openMode

int openMode
protected

◆ usageCount

UINT usageCount
protected

◆ manager

BitmapManager* manager
protected

◆ flags

int flags
protected

◆ type

int type
protected

◆ palette

BMM_Color_48 palette[256]
protected

◆ paletteSlots

int paletteSlots
protected

◆ gammaTable

UWORD* gammaTable
protected

◆ rendInfo

RenderInfo* rendInfo
protected

◆ gbuffer

GBuffer* gbuffer
protected

◆ bi

◆ evalString

MCHAR* evalString