3ds Max C++ API Reference
Loading...
Searching...
No Matches
BitmapStorage Class Referenceabstract

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/bitmap.h>

Inheritance diagram for BitmapStorage:

Public Member Functions

BMMExport BitmapStorage ()
virtual BMMExport ~BitmapStorage ()
BMMExport float SetGamma (float gam)
int HasGamma () const
BMMExport void SetHasGamma (BOOL onOff)
BMMExport UWORDGetInputGammaTable ()
virtual BMMExport MaxSDK::ColorManagement::IColorPipelineGetPipelineToRenderingSpace ()
 This function will return the pointer of the IColorPipeline object that is used to convert the colors from bitmap's input color space into the currently active rendering color space.
BitmapManagerManager () const
int OpenMode () const
int Width () const
int Height () const
float Aspect () const
float Gamma () const
int Paletted () const
int IsDithered () const
int PreMultipliedAlpha () const
int HasAlpha () const
void UseScaleColors (int on)
int ScaleColors () const
void ClampScaleColor (BMM_Color_64 &out, const BMM_Color_fl &in) const
void ClampScaleColorA (BMM_Color_64 &out, const BMM_Color_fl &in) const
int UsageCount () const
int Type () const
int Flags () const
void SetFlags (DWORD f)
void ClearFlags (DWORD f)
 Clears the given flags.
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 ResizeInto (void *, int, int, int, int, bool)
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 void UpdateColorConverters ()
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.

Public Attributes

BitmapInfo bi
MSTR m_evalString

Protected Attributes

int openMode = 0
UINT usageCount = 0
BitmapManagermanager = nullptr
int flags = 0
int type = 0
BMM_Color_48 palette [256] = {}
int paletteSlots = 0
UWORDgammaTable = nullptr
RenderInforendInfo = nullptr
GBuffergbuffer = nullptr
MSTR mFilename
FILETIME mFileTimeStamp { 0, 0 }
Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces

Friends

class BitmapManagerImp

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 ( ) const
inline
Remarks
Implemented by the System.

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

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

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

◆ GetPipelineToRenderingSpace()

virtual BMMExport MaxSDK::ColorManagement::IColorPipeline * GetPipelineToRenderingSpace ( )
virtual

This function will return the pointer of the IColorPipeline object that is used to convert the colors from bitmap's input color space into the currently active rendering color space.

Do not delete the returned pointer.

◆ Manager()

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

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

◆ OpenMode()

int OpenMode ( ) const
inline
Remarks
Implemented by the System.

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

◆ Width()

int Width ( ) const
inline
Remarks
Implemented by the System.

Returns the width (horizontal dimension) of the storage's BitmapInfo instance (bi.Width()).
2468{ return bi.Width(); }
BitmapInfo bi
Definition bitmap.h:2424

◆ Height()

int Height ( ) const
inline
Remarks
Implemented by the System.

Returns the height (vertical dimension) of the storage's BitmapInfo instance (bi.Height()).
2472{ return bi.Height(); }

◆ Aspect()

float Aspect ( ) const
inline
Remarks
Implemented by the System.

Returns the aspect ratio of the storage's BitmapInfo instance (bi.Aspect()).
2476{ return bi.Aspect(); }

◆ Gamma()

float Gamma ( ) const
inline
Remarks
Implemented by the System.

Returns the gamma setting of the storage's BitmapInfo instance (bi.Gamma()).
2480{ return bi.Gamma(); }

◆ Paletted()

int Paletted ( ) const
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.
2485{ return (flags & MAP_PALETTED) ? paletteSlots : 0; }
int paletteSlots
Definition bitmap.h:2411
int flags
Definition bitmap.h:2407
#define MAP_PALETTED
The bitmap uses a palette (not true color).
Definition bitmap.h:622

◆ IsDithered()

int IsDithered ( ) const
inline
Remarks
Implemented by the System.

Returns the dithered state of the image. If the image is dithered nonzero is returned; otherwise 0,
2489{ return (flags & MAP_DITHERED) ? 1 : 0; }
#define MAP_DITHERED
The bitmap is dithered.
Definition bitmap.h:624

◆ PreMultipliedAlpha()

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

◆ HasAlpha()

int HasAlpha ( ) const
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.
2497{ 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:620

◆ 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.
2501{ flags &= ~MAP_USE_SCALE_COLORS; if (on) flags |= MAP_USE_SCALE_COLORS; }
#define MAP_USE_SCALE_COLORS
Scale colors when high dynamic range values are out of gamut.
Definition bitmap.h:631

◆ ScaleColors()

int ScaleColors ( ) const
inline
Remarks
Implemented by the System.

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

◆ ClampColor()

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.
2513{ out.r = in.clipColor(in.r); out.g = in.clipColor(in.g); out.b = in.clipColor(in.b); }

◆ ClampColorA()

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.
2521{ ClampColor(out, in); out.a = in.clipColor(in.a); }
static void ClampColor(BMM_Color_64 &out, const BMM_Color_fl &in)
Definition bitmap.h:2513

◆ ScaleColor()

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

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

◆ ClampScaleColorA()

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

◆ UsageCount()

int UsageCount ( ) const
inline
Remarks
Implemented by the System.

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

◆ Type()

int Type ( ) const
inline
Remarks
Implemented by the System.

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

◆ Flags()

int Flags ( ) const
inline
Remarks
Implemented by the System.

Returns the bitmap flags. See Bitmap Flags.
2566{ 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.
2572{ 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); }
2596{ *bmmType = BMM_NO_TYPE; return nullptr; }
#define BMM_NO_TYPE
Not allocated yet.
Definition bitmap.h:117

◆ 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.
2610{ *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, and BitmapStorageLDR.

◆ 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, and BitmapStorageLDR.

◆ 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 BitmapStorageHDR, and 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 BitmapStorageHDR, and 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, and BitmapStorageLDR.

◆ 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, and BitmapStorageLDR.

◆ 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, and BitmapStorageLDR.

◆ 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 BitmapStorageHDR, and 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 BitmapStorageHDR, and 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 BitmapStorageHDR, and 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, and BitmapStorageLDR.

◆ 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 BitmapStorageHDR, and 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, and BitmapStorageLDR.

◆ ResizeImage()

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

Implemented in BitmapStorageHDR, and BitmapStorageLDR.

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

◆ ResizeInto()

virtual BMMExport int ResizeInto ( void * ,
int ,
int ,
int ,
int ,
bool  )
inlinevirtual
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.
3012{ return 0; }

◆ GetPalette()

virtual BMMExport int GetPalette ( int start,
int count,
BMM_Color_48 * ptr )
pure virtual

◆ 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, 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, 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;

◆ 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, and BitmapStorageLDR.

◆ 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 BitmapStorageHDR, and 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

◆ UpdateColorConverters()

virtual BMMExport void UpdateColorConverters ( )
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;}
3105{ return gbuffer ? gbuffer->GetChannel(channelID, chanType) : nullptr; }
GBuffer * gbuffer
Definition bitmap.h:2415

◆ GetGBuffer()

GBuffer * GetGBuffer ( )
inline
Remarks
Returns a pointer to the G-Buffer associated with this storage.
3109{ 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.
3126{ if (gbuffer) gbuffer->DeleteChannels(channelIDs); }

◆ ChannelsPresent()

virtual BMMExport ULONG ChannelsPresent ( )
inlinevirtual
Remarks
Returns the channels that are present. See Image (G-Buffer) Channels.
Default Implementation:
{ return 0; }
3132{ return gbuffer?gbuffer->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.

◆ BitmapManagerImp

friend class BitmapManagerImp
friend

Member Data Documentation

◆ openMode

int openMode = 0
protected

◆ usageCount

UINT usageCount = 0
protected

◆ manager

BitmapManager* manager = nullptr
protected

◆ flags

int flags = 0
protected

◆ type

int type = 0
protected

◆ palette

BMM_Color_48 palette[256] = {}
protected
2410{}; // 256 palette entries max

◆ paletteSlots

int paletteSlots = 0
protected

◆ gammaTable

UWORD* gammaTable = nullptr
protected

◆ rendInfo

RenderInfo* rendInfo = nullptr
protected

◆ gbuffer

GBuffer* gbuffer = nullptr
protected

◆ mFilename

MSTR mFilename
protected

◆ mFileTimeStamp

FILETIME mFileTimeStamp { 0, 0 }
protected
2418{ 0, 0 }; // if Read-only mode, the file modification time of file when read

◆ bi

◆ m_evalString

MSTR m_evalString