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

#include <bitmap.h>

+ Inheritance diagram for BitmapStorageHDR:

Public Member Functions

BMMExport int IsHighDynamicRange () override
 
BMMExport int StraightCopy (Bitmap *from) override
 
BMMExport int Get16Gray (int x, int y, int pixels, WORD *ptr) override
 
BMMExport int Put16Gray (int x, int y, int pixels, WORD *ptr) override
 
BMMExport int GetLinearPixels (int x, int y, int pixels, BMM_Color_64 *ptr) override
 
BMMExport int GetPixels (int x, int y, int pixels, BMM_Color_64 *ptr) override
 
BMMExport int PutPixels (int x, int y, int pixels, BMM_Color_64 *ptr) override
 
BMMExport int CropImage (int width, int height, BMM_Color_64 fillcolor) override
 
BMMExport int CropImage (int width, int height, int fillindex) override
 
BMMExport int CopyCrop (Bitmap *from, BMM_Color_64 fillcolor) override
 
BMMExport int CopyCrop (Bitmap *from, BMM_Color_fl fillcolor) override
 
BMMExport int CopyScaleLow (Bitmap *from) override
 
BMMExport int CopyScaleHigh (Bitmap *from, HWND hWnd, BMM_Color_64 **buf=nullptr, int w=0, int h=0) override
 
BMMExport int CopyScaleHigh (Bitmap *from, HWND hWnd, BMM_Color_fl **buf=nullptr, int w=0, int h=0) override
 
BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_64 fillcolor, BitmapInfo *bmInfo=nullptr) override
 
BMMExport int CopyImage (Bitmap *from, int operation, BMM_Color_fl fillcolor, BitmapInfo *bmInfo=nullptr) override
 
BMMExport int CopyImage (Bitmap *from, int operation, int fillindex) override
 
BMMExport int GetFiltered (float u, float v, float du, float dv, BMM_Color_64 *ptr) override
 
virtual BMMExport int Get16Gray (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, WORD *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 GetLinearPixels (int x, int y, int pixels, BMM_Color_fl *ptr)=0
 
virtual BMMExport int GetPixels (int x, int y, int pixels, BMM_Color_64 *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_64 *ptr)=0
 
virtual BMMExport int PutPixels (int x, int y, int pixels, BMM_Color_fl *ptr)=0
 
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 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
 
- Public Member Functions inherited from BitmapStorage
BMMExport BitmapStorage ()
 
virtual BMMExport ~BitmapStorage ()
 
 __declspec (deprecated) static MCHAR *evalString
 
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.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BitmapStorage
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 inherited from BitmapStorage
BitmapInfo bi
 
MSTR m_evalString
 
- Protected Attributes inherited from BitmapStorage
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
 

Detailed Description

See also
Class BitmapStorage.

Description:
This is the base class for the development of plug-in Bitmap Storage plug-ins that use Hight Dynamic Range bitmaps.

All methods of this class are implemented by the System.

Member Function Documentation

◆ IsHighDynamicRange()

BMMExport int IsHighDynamicRange ( )
inlineoverridevirtual
Remarks
Implemented by the System.

This method returns 0 if the bitmap is not a high dynamic range bitmap or 1 if it is.
Default Implementation:
{ return(1); }

Implements BitmapStorage.

3514{ return 1; }

◆ StraightCopy()

BMMExport int StraightCopy ( Bitmap from)
overridevirtual
Remarks
Implemented by the System.

This method does a straightforward copy from the specified bitmap.
Parameters:
Bitmap *from

The bitmap to copy from.

Implements BitmapStorage.

◆ Get16Gray() [1/3]

BMMExport int Get16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
overridevirtual
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 the storage for the retrieved pixels.
Returns
Nonzero if pixels were retrieved; otherwise 0.

Implements BitmapStorage.

◆ Put16Gray() [1/3]

BMMExport int Put16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
overridevirtual
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 the storage for the pixels.
Returns
Nonzero if pixels were stored; otherwise 0.

Implements BitmapStorage.

◆ GetLinearPixels() [1/3]

BMMExport int GetLinearPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
overridevirtual
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 retrieve.

BMM_Color_64 *ptr

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

Implements BitmapStorage.

◆ GetPixels() [1/3]

BMMExport int GetPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
overridevirtual
Remarks
int x

Source x location.

int y

Source y location.

int pixels

Number of pixels to retrieve.

BMM_Color_fl *ptr

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

Implements BitmapStorage.

◆ PutPixels() [1/3]

BMMExport int PutPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
overridevirtual
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

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

Implements BitmapStorage.

◆ CropImage() [1/5]

BMMExport int CropImage ( int  width,
int  height,
BMM_Color_64  fillcolor 
)
overridevirtual
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.
Returns
Nonzero if the image was cropped; otherwise 0.

Implements BitmapStorage.

◆ CropImage() [2/5]

BMMExport int CropImage ( int  width,
int  height,
int  fillindex 
)
overridevirtual
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.

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.

Implements BitmapStorage.

◆ CopyCrop() [1/4]

BMMExport int CopyCrop ( Bitmap from,
BMM_Color_64  fillcolor 
)
overridevirtual
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.
Returns
Nonzero if the copy/crop was performed; otherwise zero.

Implements BitmapStorage.

◆ CopyCrop() [2/4]

BMMExport int CopyCrop ( Bitmap from,
BMM_Color_fl  fillcolor 
)
overridevirtual
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.
Returns
Nonzero if the copy/crop was performed; otherwise zero.

Implements BitmapStorage.

◆ CopyScaleLow() [1/2]

BMMExport int CopyScaleLow ( Bitmap from)
overridevirtual
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 bitmap to copy to this bitmap.
Returns
Nonzero if the copy/scale was performed; otherwise zero.

Implements BitmapStorage.

◆ CopyScaleHigh() [1/4]

BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_64 **  buf = nullptr,
int  w = 0,
int  h = 0 
)
overridevirtual
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.

Implements BitmapStorage.

◆ CopyScaleHigh() [2/4]

BMMExport int CopyScaleHigh ( Bitmap from,
HWND  hWnd,
BMM_Color_fl **  buf = nullptr,
int  w = 0,
int  h = 0 
)
overridevirtual
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.

Implements BitmapStorage.

◆ CopyImage() [1/6]

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

BitmapInfo *bmInfo = NULL

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.

Implements BitmapStorage.

◆ CopyImage() [2/6]

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

BitmapInfo *bmInfo = NULL

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.

Implements BitmapStorage.

◆ CopyImage() [3/6]

BMMExport int CopyImage ( Bitmap from,
int  operation,
int  fillindex 
)
overridevirtual
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 the 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 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.
Returns
Nonzero if the copy was performed; otherwise 0.

Implements BitmapStorage.

◆ GetFiltered() [1/3]

BMMExport int GetFiltered ( float  u,
float  v,
float  du,
float  dv,
BMM_Color_64 ptr 
)
overridevirtual
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_fl *ptr

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

Implements BitmapStorage.

◆ Get16Gray() [2/3]

virtual BMMExport int Get16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
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.

Implements BitmapStorage.

◆ Get16Gray() [3/3]

virtual BMMExport int Get16Gray ( int  x,
int  y,
int  pixels,
float *  ptr 
)
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.

Implements BitmapStorage.

◆ Put16Gray() [2/3]

virtual BMMExport int Put16Gray ( int  x,
int  y,
int  pixels,
WORD *  ptr 
)
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.

Implements BitmapStorage.

◆ Put16Gray() [3/3]

virtual BMMExport int Put16Gray ( int  x,
int  y,
int  pixels,
float *  ptr 
)
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.

Implements BitmapStorage.

◆ GetLinearPixels() [2/3]

virtual BMMExport int GetLinearPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
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.

Implements BitmapStorage.

◆ GetLinearPixels() [3/3]

virtual BMMExport int GetLinearPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
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.

Implements BitmapStorage.

◆ GetPixels() [2/3]

virtual BMMExport int GetPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
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.

Implements BitmapStorage.

◆ GetPixels() [3/3]

virtual BMMExport int GetPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
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.

Implements BitmapStorage.

◆ PutPixels() [2/3]

virtual BMMExport int PutPixels ( int  x,
int  y,
int  pixels,
BMM_Color_64 ptr 
)
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.

Implements BitmapStorage.

◆ PutPixels() [3/3]

virtual BMMExport int PutPixels ( int  x,
int  y,
int  pixels,
BMM_Color_fl ptr 
)
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.

Implements BitmapStorage.

◆ CropImage() [3/5]

virtual BMMExport int CropImage ( int  width,
int  height,
BMM_Color_64  fillcolor 
)
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.

Implements BitmapStorage.

◆ CropImage() [4/5]

virtual BMMExport int CropImage ( int  width,
int  height,
BMM_Color_fl  fillcolor 
)
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.

Implements BitmapStorage.

◆ CropImage() [5/5]

virtual BMMExport int CropImage ( int  width,
int  height,
int  fillindex 
)
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.

Implements BitmapStorage.

◆ ResizeImage()

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

Implements BitmapStorage.

◆ CopyCrop() [3/4]

virtual BMMExport int CopyCrop ( Bitmap from,
BMM_Color_64  fillcolor 
)
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.

Implements BitmapStorage.

◆ CopyCrop() [4/4]

virtual BMMExport int CopyCrop ( Bitmap from,
BMM_Color_fl  fillcolor 
)
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.

Implements BitmapStorage.

◆ CopyScaleLow() [2/2]

virtual BMMExport int CopyScaleLow ( Bitmap from)
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.

Implements BitmapStorage.

◆ CopyScaleHigh() [3/4]

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

Implements BitmapStorage.

◆ CopyScaleHigh() [4/4]

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

Implements BitmapStorage.

◆ CopyImage() [4/6]

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

Implements BitmapStorage.

◆ CopyImage() [5/6]

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

Implements BitmapStorage.

◆ CopyImage() [6/6]

virtual BMMExport int CopyImage ( Bitmap from,
int  operation,
int  fillindex 
)
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.

Implements BitmapStorage.

◆ GetFiltered() [2/3]

virtual BMMExport int GetFiltered ( float  u,
float  v,
float  du,
float  dv,
BMM_Color_64 ptr 
)
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.

Implements BitmapStorage.

◆ GetFiltered() [3/3]

virtual BMMExport int GetFiltered ( float  u,
float  v,
float  du,
float  dv,
BMM_Color_fl ptr 
)
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.

Implements BitmapStorage.