3ds Max C++ API Reference
bitmap.h File Reference

Contains classes and utilities for reading and writing images. More...

#include "BMMExport.h"
#include <WTypes.h>
#include <vfw.h>
#include <CommDlg.h>
#include "maxheap.h"
#include "palutil.h"
#include "linklist.h"
#include "gbuf.h"
#include "pixelbuf.h"
#include "path.h"
#include "containers/array.h"
#include "assetmanagement/AssetType.h"
#include "assetmanagement/IAssetAccessor.h"
#include "assetmanagement/AssetUser.h"
#include "geom/matrix3.h"
#include "GetCOREInterface.h"
#include "geom/box2.h"

Classes

class  bmmHistoryList
 
struct  BMMImageInfo
 
struct  BMM_Pyramid
 
struct  BMM_SAT
 
class  BMM_IOHandler
 
class  BMM_IOList
 This class is used for storing a linked list of Bitmap Manager BMM_IOHandler objects. More...
 
class  RenderInfo
 
class  BitmapInfo
 Information about an image file or in-memory bitmap, including settings for loading/saving, gamma, etc. More...
 
class  BitmapIO
 Base class for image IO plugins. More...
 
class  BitmapStorage
 
class  BitmapStorageLDR
 
class  BitmapStorageHDR
 
class  BitmapFilter
 
class  BitmapDither
 
class  BitmapNotify
 
class  CropCallback
 
class  Bitmap
 Class for image input and output. More...
 
struct  BMMStorageList
 
struct  BMMFilterList
 
struct  BMMBitmapList
 
struct  BMMGammaSettings
 
struct  BMMVfbPalette
 
class  BitmapFileInputDialog
 Custom browse bitmap file for input dialog. More...
 
class  BitmapFileOutputDialog
 Custom browse bitmap file for output dialog. More...
 
class  BitmapManager
 
class  IBitmapProxyManager
 Bitmap Proxy Manager Function-Published Interface. More...
 
class  BitmapProxyTemporaryDisableGuard
 Useful Guard class for temporarily disabling bitmap proxies. More...
 
class  BitmapIOLayer
 
class  BitmapLayerUtl
 
class  IBitmapPager
 
class  BitmapIOMetaData
 Extends BitmapIO with additional information for automatic gamma correction etc. More...
 

Macros

#define INTBITS   (sizeof(int) * 8)
 
#define IMGCLASSID   1
 
#define CYCLECLASSID   2
 
#define FLICCLASSID   5
 
#define TARGACLASSID   6
 
#define YUVCLASSID   7
 
#define FBCLASSID   8
 
#define WSDCLASSID   9
 
#define IFLCLASSID   10
 
#define BMPCLASSID   11
 
#define JPEGCLASSID   12
 
#define TARGAPLSCLASSID   13
 
#define AVICLASSID   14
 
#define RLACLASSID   15
 
#define RPFCLASSID   16
 
#define MPGCLASSID   17
 
#define MAXOPENEXR_CLASSID   Class_ID(0x12f95b5e, 0x62a60b57)
 
#define BMM_NO_TYPE   0
 Not allocated yet. More...
 
#define BMM_LINE_ART   1
 1-bit monochrome image More...
 
#define BMM_PALETTED   2
 8-bit paletted image. More...
 
#define BMM_GRAY_8   3
 8-bit grayscale bitmap. More...
 
#define BMM_GRAY_16   4
 16-bit grayscale bitmap. More...
 
#define BMM_TRUE_16   5
 16-bit true color image. More...
 
#define BMM_TRUE_32   6
 32-bit color: 8 bits each for Red, Green, Blue, and Alpha. More...
 
#define BMM_TRUE_64   7
 64-bit color: 16 bits each for Red, Green, Blue, and Alpha. More...
 
#define BMM_LOGLUV_32   13
 This format uses a logarithmic encoding of luminance and U' and V' in the CIE perceptively uniform space. More...
 
#define BMM_LOGLUV_24   14
 This format is similar to BMM_LOGLUV_32 except is uses smaller values to give a span of 5 order of magnitude from 1/4096 to 16 in 1.1% luminance steps. More...
 
#define BMM_LOGLUV_24A   15
 This format is similar to BMM_LOGLUV_24, except the 8 bit alpha value is kept with the 24 bit color value in a single 32 bit word. More...
 
#define BMM_REALPIX_32   16
 The "Real Pixel" format. More...
 
#define BMM_FLOAT_RGBA_32   17
 32-bit floating-point per component (non-compressed), RGB with or without alpha More...
 
#define BMM_FLOAT_GRAY_32   18
 32-bit floating-point (non-compressed), monochrome/grayscale More...
 
#define BMM_TRUE_24   8
 24-bit color: 8 bits each for Red, Green, and Blue. More...
 
#define BMM_TRUE_48   9
 48-bit color: 16 bits each for Red, Green, and Blue. More...
 
#define BMM_YUV_422   10
 This is the YUV format - CCIR 601. More...
 
#define BMM_BMP_4   11
 Windows BMP 16-bit color bitmap. More...
 
#define BMM_PAD_24   12
 Padded 24-bit (in a 32 bit register). More...
 
#define BMM_FLOAT_RGB_32   19
 ONLY returned by the GetStoragePtr() method of BMM_FLOAT_RGBA_32 storage, NOT an actual storage type! When GetStoragePtr() returns this type, the data should be interpreted as three floating-point values, corresponding to Red, Green, and Blue (in this order). More...
 
#define BMM_FLOAT_A_32   20
 ONLY returned by the GetAlphaStoragePtr() method of BMM_FLOAT_RGBA_32 or BMM_FLOAT_GRAY_32 storage, NOT an actual storage type! When GetStorageAlphaPtr() returns this type, the data should be interpreted as floating-point values one value per pixel, corresponding to Alpha. More...
 
#define MAX_DESCRIPTION   256
 
#define MINGAMMA   0.2f
 
#define MAXGAMMA   5.0f
 
#define BMM_NOT_OPEN   0
 Not opened yet. More...
 
#define BMM_OPEN_R   1
 Read-only. More...
 
#define BMM_OPEN_W   2
 Write-only. More...
 
#define BMMIO_NONE   0
 Not defined yet. More...
 
#define BMMIO_READER   (1<<0)
 Reads image files. More...
 
#define BMMIO_WRITER   (1<<1)
 Writes image files. More...
 
#define BMMIO_EXTENSION   (1<<2)
 Uses file extension (File Filter Type) More...
 
#define BMMIO_MULTIFRAME   (1<<3)
 "File" contains multiple frames (i.e. More...
 
#define BMMIO_THREADED   (1<<4)
 Not used. More...
 
#define BMMIO_RANDOM_ACCESS   (1<<5)
 Can read and/or write frames in any order. More...
 
#define BMMIO_NON_CONCURRENT_ACCESS   (1<<6)
 Device cannot handle multiple, concurrent requests (FLC, AVI, VTR's, etc) More...
 
#define BMMIO_OWN_VIEWER   (1<<7)
 Driver has its own image viewer for its image type as opposed to using the generic Virtual Frame Buffer. More...
 
#define BMMIO_FRAMEBUFFER   (1<<7)
 Frame Buffer Driver. More...
 
#define BMMIO_GRABBER   (1<<8)
 Device Grabs Video. More...
 
#define BMMIO_INFODLG   (1<<9)
 If the device is able to show its own image info dialogue this flag will be set. More...
 
#define BMMIO_UNINTERRUPTIBLE   (1<<10)
 If a driver cannot be started and stopped this flag should be set. More...
 
#define BMMIO_EVALMATCH   (1<<11)
 Drivers that may have a different image for a same given Max frame and same file/device name should define this and implement the EvalMatch() method. More...
 
#define BMMIO_IFL   (1<<28)
 If this flag is set, instead of calling the Load() method 3ds Max calls the GetImageName() method. More...
 
#define BMMIO_CONTROLREAD   (1<<29)
 There is only a single call to the plugin's control panel but the call specifies the nature of the operation going on. More...
 
#define BMMIO_CONTROLWRITE   (1<<30)
 Device Driver has Control Panel for Write Operations. More...
 
#define BMMIO_CONTROLGENERIC   (1<<31)
 Device Driver has a generic Control Panel. More...
 
#define BMM_CLOSE_COMPLETE   0
 Close and save the image. More...
 
#define BMM_CLOSE_ABANDON   1
 Many bitmap loader / savers do not make use of these flags. More...
 
#define BMM_FILTER_NONE   0
 Specifies no filtering should be performed. More...
 
#define BMM_FILTER_DUMMY   1
 No longer used. More...
 
#define BMM_FILTER_SUM   2
 Specifies summed area filtering. More...
 
#define BMM_FILTER_PYRAMID   3
 Specifies pyramidal filtering. More...
 
#define BMM_FILTER_NOFLAGS   ((DWORD)0)
 
#define BMM_FILTER_LERP_WRAP   ((DWORD)(1<<0))
 
#define BMM_FILTER_BUILD_FAILED   ((DWORD)(1<<1))
 
#define BMM_DITHER_NONE   0
 
#define BMM_DITHER_FLOYD   1
 
#define MAX_PYRAMID_DEPTH   12
 
#define LAYER_DIM   MAX_PYRAMID_DEPTH+1
 
#define COPY_IMAGE_CROP   0
 Copy image to current map size w/cropping if necessary. More...
 
#define COPY_IMAGE_RESIZE_LO_QUALITY   1
 This is a resize from 50x50 to 150x150 using this option. More...
 
#define COPY_IMAGE_RESIZE_HI_QUALITY   2
 This is a resize from 50x50 to 150x150 using this option. More...
 
#define COPY_IMAGE_USE_CUSTOM   3
 Resize based on Image Input Options (BitmapInfo *) More...
 
#define MAP_NOFLAGS   ((DWORD)0)
 The bitmap has none of the characteristics below. More...
 
#define MAP_READY   ((DWORD)(1<<0))
 This bitmap has had memory allocated to it, or is accessible directly. More...
 
#define MAP_HAS_ALPHA   ((DWORD)(1<<1))
 This flag can be checked from a BitmapInfo instance (bi.Flags()&MAP_HAS_ALPHA)), but not from a Bitmap instance (bmap->Flags() & MAP_HAS_ALPHA). More...
 
#define MAP_ALPHA_PREMULTIPLIED   ((DWORD)(1<<2))
 The bitmap has pre-multiplied alpha. More...
 
#define MAP_PALETTED   ((DWORD)(1<<3))
 The bitmap uses a palette (not true color). More...
 
#define MAP_FRAME_SYSTEM_LOCKED   ((DWORD)(1<<4))
 This flag is no longer used. More...
 
#define MAP_DITHERED   ((DWORD)(1<<5))
 The bitmap is dithered. More...
 
#define MAP_FLIPPED   ((DWORD)(1<<6))
 The bitmap is flipped horizontally. More...
 
#define MAP_INVERTED   ((DWORD)(1<<7))
 The bitmap is flipped vertically. More...
 
#define MAP_USE_SCALE_COLORS   ((DWORD)(1<<10))
 Scale colors when high dynamic range values are out of gamut. More...
 
#define MAP_PROXY   ((DWORD)(1<<11))
 When the proxy flag is set, the BitmapInfo is called a proxy info. More...
 
#define MAP_PROXYREQUEST   ((DWORD)(1<<12))
 When the proxy request flag is set, the BitmapInfo is called a request info. More...
 
#define MAP_WAS_UPDATED   ((DWORD)(1<<28))
 This flag indicates that PutPixels() was called and the Bitmap has been updated with new data. More...
 
#define MAP_HAS_BGIMAGE   ((DWORD)(1<<29))
 internal use only More...
 
#define MAP_LEGAL_DELETE   ((DWORD)(1<<30))
 internal use only More...
 
#define MAP_VIEW_FILTERED   ((DWORD)(1<<31))
 Test stuff. More...
 
#define MAP_ALL_FLAGS   0xFFFFFFFF
 
#define BMM_PROGRESS   WM_USER + 0x120
 
#define BMM_CHECKABORT   WM_USER + 0x121
 
#define BMM_TEXTMSG   WM_USER + 0x122
 
#define BMM_UNDEF_FRAME   0x7FFF0000
 
#define BMM_CUSTOM_GAMMA   ((DWORD)(1 << 0))
 Flags that a Custom gamma is used. More...
 
#define BMM_CUSTOM_SIZE   ((DWORD)(1 << 1))
 Custom size setting. More...
 
#define BMM_CUSTOM_RESFIT   ((DWORD)(1 << 2))
 Bitmap is to be resized. More...
 
#define BMM_CUSTOM_POS   ((DWORD)(1 << 3))
 Bitmap has a custom positioning. More...
 
#define BMM_CUSTOM_FILEGAMMA   ((DWORD)(1 << 4))
 This flags if a loaded bitmap's gamma came from file, as well as flags the "Automatic" gamma correction mode for file load and save. More...
 
#define BMM_CUSTOM_IFLENUMFILES   ((DWORD)(1 << 5))
 
#define BMM_CUSTOM_HDR_TYPE   ((DWORD)(1 << 6))
 Internal Use Only. More...
 
#define BMM_CUSTOM_INFERREDGAMMA   ((DWORD)(1 << 8))
 Additional flag to BMM_CUSTOM_FILEGAMMA. Did gamma actuallly come from data stored in the file, or was it inferred from the file type? More...
 
#define BMM_CUSTOM_NOGAMMAUI   ((DWORD)(1 << 9))
 Settings this flag causes the Bitmap file dialog to gray out the Gamma UI. More...
 
#define BMM_CUSTOM_POSNW   0
 Top Left. More...
 
#define BMM_CUSTOM_POSN   1
 Top Center. More...
 
#define BMM_CUSTOM_POSNE   2
 Top Right. More...
 
#define BMM_CUSTOM_POSW   3
 Middle Left. More...
 
#define BMM_CUSTOM_POSCN   4
 Center. More...
 
#define BMM_CUSTOM_POSE   5
 Middle Right. More...
 
#define BMM_CUSTOM_POSSW   6
 Bottom Left. More...
 
#define BMM_CUSTOM_POSS   7
 Bottom Center. More...
 
#define BMM_CUSTOM_POSSE   8
 Bottom Right. More...
 
#define BMM_SEQ_WRAP   0
 
#define BMM_SEQ_ERROR   1
 
#define BMM_SEQ_HOLD   2
 
#define BMM_CHANNEL_RED   0
 
#define BMM_CHANNEL_GREEN   1
 
#define BMM_CHANNEL_BLUE   3
 
#define BMM_CHANNEL_ALPHA   4
 
#define BMM_CHANNEL_Z   5
 
#define BMM_CHANNEL_LUMINANCE   6
 
#define BMNOTIFY_FLAG_STORAGE_CHANGE   0
 
#define BMNOTIFY_FLAG_FILE_CHANGE   1
 
#define BMM_SINGLEFRAME   -2000000L
 
#define BMM_UL   1
 
#define BMM_LL   2
 
#define BMM_UR   3
 
#define BMM_LR   4
 
#define BMM_CN   5
 
#define BMM_RND   10
 
#define BMM_VPP   11
 
#define BMM_VPS   12
 
#define LG_NOLOG   0
 
#define LG_FATAL   ((DWORD)(1 << 0))
 
#define LG_INFO   ((DWORD)(1 << 1))
 
#define LG_DEBUG   ((DWORD)(1 << 2))
 
#define LG_WARN   ((DWORD)(1 << 3))
 
#define BMM_ENABLE_SAVE_REGION   1
 
#define BMM_DO_SAVE_REGION   2
 
#define BMM_STORE_GEOREF_DATA   0
 
#define BMM_RETRIEVE_GEOREF_DATA   1
 
#define BMM_USE_CUSTOM_FILTERLIST   2
 
#define BMM_SET_FILE_INPUT_SEQUENCE_FLAG   3
 
#define BMM_GET_FILE_INPUT_SEQUENCE_FLAG   4
 
#define BMM_FLUSH_RELATIVE_FILE_RESOLUTION_CACHE   5
 
#define FPBITMAPPROXYMANAGER_INTERFACE_ID   Interface_ID(0x24e22528, 0x601f3610)
 Interface ID of the IBitmapProxyManager interface. More...
 
#define BMM_ASSET_GROUP   1
 Bitmap asset declaration flags. More...
 
#define BMM_ASSET_PROXY   2
 The declared bitmap is proxy enabled. More...
 
#define BITMAP_IOLAYER_CLASS   Interface_ID(0x296b79ec,0x73e11944)
 
#define LAYER_INTERFACE   Interface_ID(0x1563269c,0x7ec41d89)
 
#define I_LAYER_INTERFACE   0x000A1001
 
#define IBITMAPPAGER_INTERFACE_ID   Interface_ID(0x48e1041f, 0x34c86c51)
 Interface ID of the IBitmapPager interface. More...
 
#define BITMAPIOMETADATA_INTERFACE_ID   Interface_ID(0x56507912, 0x7e3c56db)
 Interface ID of the BitmapIOMetaData interface. More...
 
#define BMMRES_SUCCESS   0
 Success - No error occurred. More...
 
#define BMMRES_ERRORTAKENCARE   1
 Error - Function has already taken action to process the error. More...
 
#define BMMRES_FILENOTFOUND   2
 The file being accessed was not found. More...
 
#define BMMRES_MEMORYERROR   3
 Insufficient memory for the requested operation. More...
 
#define BMMRES_NODRIVER   4
 Device driver responsible for image not present. More...
 
#define BMMRES_IOERROR   5
 Input / Output error. More...
 
#define BMMRES_INVALIDFORMAT   6
 The file being access was not of the proper format for the requested operation. More...
 
#define BMMRES_CORRUPTFILE   7
 The file being accessed was corrupt. More...
 
#define BMMRES_SINGLEFRAME   8
 Results from a goto request on a single frame image. More...
 
#define BMMRES_INVALIDUSAGE   9
 Bad argument passed to function (Developer Mistake) More...
 
#define BMMRES_RETRY   10
 This is returned if the user selects Retry from the 3ds Max Image IO Error dialog box. More...
 
#define BMMRES_NUMBEREDFILENAMEERROR   11
 This can be passed as an error code to BitmapIO::ProcessImageIOError(). More...
 
#define BMMRES_INTERNALERROR   12
 An internal error occurred. More...
 
#define BMMRES_BADFILEHEADER   13
 A file header error occurred. More...
 
#define BMMRES_CANTSTORAGE   14
 This is used internally. More...
 
#define BMMRES_BADFRAME   15
 Invalid Frame Number Requested. More...
 

Typedefs

using BMMRES = unsigned short
 Traps the use of int or BOOL. More...
 
typedef LinkedEntryT< MSTRMSTREntry
 
typedef LinkedListT< MSTR, MSTREntryMSTRList
 
typedef BOOL(WINAPI * PBITMAP_FX_CALLBACK) (LPVOID lpparam, int done, int total, const MCHAR *msg)
 
typedef LinkedEntryT< BMM_IOHandlerBMM_IOHandlerEntry
 
typedef LinkedListT< BMM_IOHandler, BMM_IOHandlerEntryBMM_IOHandlerList
 

Enumerations

enum  ProjectionType { ProjPerspective =0 , ProjParallel =1 }
 

Functions

BMMExport IBitmapProxyManagerGetBitmapProxyManager ()
 Returns the Bitmap Proxy Manager singleton object. More...
 
BMMExport void DeclareBitmapAsset (IEnumAuxAssetsCallback &enumCallback, IAssetAccessor &anAccessor, BitmapInfo *bitmapInfo, int flags=0)
 Declare a bitmap asset accessor to the specified callback. More...
 
int ValidBitmapType (int type)
 
BMMExport BitmapStorageBMMCreateStorage (BitmapManager *manager, UINT type)
 
BMMExport BitmapFilterBMMCreateFilter (BitmapManager *manager, UINT type)
 
BMMExport BitmapDitherBMMCreateDither (BitmapManager *manager, UINT type)
 
BMMExport int BMMCalcPalette (Bitmap *map, int colors, BMM_Color_48 *palette)
 
BMMExport BYTE BMMClosestColor (BMM_Color_64 *color, BMM_Color_48 *palette, int colors)
 
BMMExport const MCHARBMMGetBitmapTypeDescription (int bitmapType, DWORD bitmapFlags)
 
BMMExport void OpenBMM (BMMInterface *i)
 
BMMExport void CloseBMM ()
 
INT_PTR CALLBACK BMMGammaDlgProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
void ExtractExtension (const MCHAR *string, MCHAR *ext, size_t extSize)
 
BMMExport int BMMCreateNumberedFilename (const MCHAR *namein, int frame, MCHAR *nameout)
 Create a filename appended by the specified frame number. More...
 
BMMExport int BMMFindNumberedFilenames (const MaxSDK::Util::Path &baseFilename, MaxSDK::Array< MaxSDK::Util::Path > &foundFiles)
 Retrieve a list of existing files in a sequence that matches the base filename and numbering of the specified filename. More...
 
BMMExport int BMMGetFullFilename (BitmapInfo *bi)
 These functions search the system for a bitmap. More...
 
BMMExport BOOL BMMGetFullFilename (const MCHAR *namein, MCHAR *nameout, size_t nameoutSize)
 
BMMExport BOOL BMMIsFile (const MCHAR *filename)
 
BMMExport void BMMSplitFilename (const MCHAR *name, MCHAR *directory, size_t directorySize, MCHAR *filename, size_t filenameSize, MCHAR *extension, size_t extensionSize)
 Splits up a file path into three strings, the directory name, file name, and file extension. More...
 
BMMExport LPMSTR BMMGetLastErrorText (LPMSTR lpszBuf, DWORD dwSize)
 
BMMExport QuantizerBMMNewQuantizer ()
 
BMMExport void BMMAppendSlash (MCHAR *path)
 This function appends a slash character to the end of the path passed unless one already exists. More...
 
BMMExport void BMMRemoveSlash (MCHAR *path)
 This function removes the slash character from the end of the path passed if present. More...
 
BMMExport void BMMAppendSlash (MSTR &path)
 This function appends a slash character to the end of the path passed unless one already exists. More...
 
BMMExport void BMMRemoveSlash (MSTR &path)
 This function removes the slash character from the end of the path passed if present. More...
 
BMMExport BOOL BMMGetUniversalName (MCHAR *out_uncname, size_t in_uncnameSize, const MCHAR *in_path)
 
BMMExport BOOL BMMFindNetworkShare (const MCHAR *in_localpath, MCHAR *out_sharename, MCHAR *out_sharepath)
 
BMMExport BOOL BMMGetLocalShare (const MCHAR *local_path, MCHAR *share)
 
BMMExport ColorPackerBMMNewColorPacker (int w, BMM_Color_48 *pal, int npal, BYTE *remap=nullptr)
 
BMMExport void FixPaletteForWindows (BMM_Color_48 *pal, BMM_Color_48 *newpal, int ncols, BYTE *remap=nullptr)
 
IBitmapPagerGetIBitmapPager ()
 Returns the Bitmap Pager singleton object. More...
 

Variables

int TheSystemFrame
 External data. More...
 
BMMExport BitmapManagerTheManager
 The Primary Bitmap Manager Object. More...
 

Detailed Description

Contains classes and utilities for reading and writing images.

Macro Definition Documentation

◆ INTBITS

#define INTBITS   (sizeof(int) * 8)

◆ IMGCLASSID

#define IMGCLASSID   1

◆ CYCLECLASSID

#define CYCLECLASSID   2

◆ FLICCLASSID

#define FLICCLASSID   5

◆ TARGACLASSID

#define TARGACLASSID   6

◆ YUVCLASSID

#define YUVCLASSID   7

◆ FBCLASSID

#define FBCLASSID   8

◆ WSDCLASSID

#define WSDCLASSID   9

◆ IFLCLASSID

#define IFLCLASSID   10

◆ BMPCLASSID

#define BMPCLASSID   11

◆ JPEGCLASSID

#define JPEGCLASSID   12

◆ TARGAPLSCLASSID

#define TARGAPLSCLASSID   13

◆ AVICLASSID

#define AVICLASSID   14

◆ RLACLASSID

#define RLACLASSID   15

◆ RPFCLASSID

#define RPFCLASSID   16

◆ MPGCLASSID

#define MPGCLASSID   17

◆ MAXOPENEXR_CLASSID

#define MAXOPENEXR_CLASSID   Class_ID(0x12f95b5e, 0x62a60b57)

◆ MAX_DESCRIPTION

#define MAX_DESCRIPTION   256

◆ MINGAMMA

#define MINGAMMA   0.2f

◆ MAXGAMMA

#define MAXGAMMA   5.0f

◆ BMMRES_SUCCESS

#define BMMRES_SUCCESS   0

Success - No error occurred.

◆ BMMRES_ERRORTAKENCARE

#define BMMRES_ERRORTAKENCARE   1

Error - Function has already taken action to process the error.

◆ BMMRES_FILENOTFOUND

#define BMMRES_FILENOTFOUND   2

The file being accessed was not found.

◆ BMMRES_MEMORYERROR

#define BMMRES_MEMORYERROR   3

Insufficient memory for the requested operation.

◆ BMMRES_NODRIVER

#define BMMRES_NODRIVER   4

Device driver responsible for image not present.

◆ BMMRES_IOERROR

#define BMMRES_IOERROR   5

Input / Output error.

◆ BMMRES_INVALIDFORMAT

#define BMMRES_INVALIDFORMAT   6

The file being access was not of the proper format for the requested operation.

◆ BMMRES_CORRUPTFILE

#define BMMRES_CORRUPTFILE   7

The file being accessed was corrupt.


◆ BMMRES_SINGLEFRAME

#define BMMRES_SINGLEFRAME   8

Results from a goto request on a single frame image.

◆ BMMRES_INVALIDUSAGE

#define BMMRES_INVALIDUSAGE   9

Bad argument passed to function (Developer Mistake)

◆ BMMRES_RETRY

#define BMMRES_RETRY   10

This is returned if the user selects Retry from the 3ds Max Image IO Error dialog box.

This dialog is presented by the method BitmapIO::ProcessImageIOError(). User selected "Retry" from error dialogue.

◆ BMMRES_NUMBEREDFILENAMEERROR

#define BMMRES_NUMBEREDFILENAMEERROR   11

This can be passed as an error code to BitmapIO::ProcessImageIOError().

◆ BMMRES_INTERNALERROR

#define BMMRES_INTERNALERROR   12

An internal error occurred.

◆ BMMRES_BADFILEHEADER

#define BMMRES_BADFILEHEADER   13

A file header error occurred.

◆ BMMRES_CANTSTORAGE

#define BMMRES_CANTSTORAGE   14

This is used internally.

◆ BMMRES_BADFRAME

#define BMMRES_BADFRAME   15

Invalid Frame Number Requested.

◆ BMM_FILTER_NOFLAGS

#define BMM_FILTER_NOFLAGS   ((DWORD)0)

◆ BMM_FILTER_LERP_WRAP

#define BMM_FILTER_LERP_WRAP   ((DWORD)(1<<0))

◆ BMM_FILTER_BUILD_FAILED

#define BMM_FILTER_BUILD_FAILED   ((DWORD)(1<<1))

◆ BMM_DITHER_NONE

#define BMM_DITHER_NONE   0

◆ BMM_DITHER_FLOYD

#define BMM_DITHER_FLOYD   1

◆ MAX_PYRAMID_DEPTH

#define MAX_PYRAMID_DEPTH   12

◆ LAYER_DIM

#define LAYER_DIM   MAX_PYRAMID_DEPTH+1

◆ BMM_PROGRESS

#define BMM_PROGRESS   WM_USER + 0x120

◆ BMM_CHECKABORT

#define BMM_CHECKABORT   WM_USER + 0x121

◆ BMM_TEXTMSG

#define BMM_TEXTMSG   WM_USER + 0x122

◆ BMM_UNDEF_FRAME

#define BMM_UNDEF_FRAME   0x7FFF0000

◆ BMM_SEQ_WRAP

#define BMM_SEQ_WRAP   0

◆ BMM_SEQ_ERROR

#define BMM_SEQ_ERROR   1

◆ BMM_SEQ_HOLD

#define BMM_SEQ_HOLD   2

◆ BMM_CHANNEL_RED

#define BMM_CHANNEL_RED   0

◆ BMM_CHANNEL_GREEN

#define BMM_CHANNEL_GREEN   1

◆ BMM_CHANNEL_BLUE

#define BMM_CHANNEL_BLUE   3

◆ BMM_CHANNEL_ALPHA

#define BMM_CHANNEL_ALPHA   4

◆ BMM_CHANNEL_Z

#define BMM_CHANNEL_Z   5

◆ BMM_CHANNEL_LUMINANCE

#define BMM_CHANNEL_LUMINANCE   6

◆ BMNOTIFY_FLAG_STORAGE_CHANGE

#define BMNOTIFY_FLAG_STORAGE_CHANGE   0

◆ BMNOTIFY_FLAG_FILE_CHANGE

#define BMNOTIFY_FLAG_FILE_CHANGE   1

◆ BMM_SINGLEFRAME

#define BMM_SINGLEFRAME   -2000000L

◆ BMM_UL

#define BMM_UL   1

◆ BMM_LL

#define BMM_LL   2

◆ BMM_UR

#define BMM_UR   3

◆ BMM_LR

#define BMM_LR   4

◆ BMM_CN

#define BMM_CN   5

◆ BMM_RND

#define BMM_RND   10

◆ BMM_VPP

#define BMM_VPP   11

◆ BMM_VPS

#define BMM_VPS   12

◆ LG_NOLOG

#define LG_NOLOG   0

◆ LG_FATAL

#define LG_FATAL   ((DWORD)(1 << 0))

◆ LG_INFO

#define LG_INFO   ((DWORD)(1 << 1))

◆ LG_DEBUG

#define LG_DEBUG   ((DWORD)(1 << 2))

◆ LG_WARN

#define LG_WARN   ((DWORD)(1 << 3))

◆ BMM_ENABLE_SAVE_REGION

#define BMM_ENABLE_SAVE_REGION   1

◆ BMM_DO_SAVE_REGION

#define BMM_DO_SAVE_REGION   2

◆ BMM_STORE_GEOREF_DATA

#define BMM_STORE_GEOREF_DATA   0

◆ BMM_RETRIEVE_GEOREF_DATA

#define BMM_RETRIEVE_GEOREF_DATA   1

◆ BMM_USE_CUSTOM_FILTERLIST

#define BMM_USE_CUSTOM_FILTERLIST   2

◆ BMM_SET_FILE_INPUT_SEQUENCE_FLAG

#define BMM_SET_FILE_INPUT_SEQUENCE_FLAG   3

◆ BMM_GET_FILE_INPUT_SEQUENCE_FLAG

#define BMM_GET_FILE_INPUT_SEQUENCE_FLAG   4

◆ BMM_FLUSH_RELATIVE_FILE_RESOLUTION_CACHE

#define BMM_FLUSH_RELATIVE_FILE_RESOLUTION_CACHE   5

◆ FPBITMAPPROXYMANAGER_INTERFACE_ID

#define FPBITMAPPROXYMANAGER_INTERFACE_ID   Interface_ID(0x24e22528, 0x601f3610)

Interface ID of the IBitmapProxyManager interface.

◆ BMM_ASSET_GROUP

#define BMM_ASSET_GROUP   1

Bitmap asset declaration flags.

The declared bitmap represents a group. You must call EndGroup on the enum callback after you are finished grouping assets.

◆ BMM_ASSET_PROXY

#define BMM_ASSET_PROXY   2

The declared bitmap is proxy enabled.

◆ BITMAP_IOLAYER_CLASS

#define BITMAP_IOLAYER_CLASS   Interface_ID(0x296b79ec,0x73e11944)

◆ LAYER_INTERFACE

#define LAYER_INTERFACE   Interface_ID(0x1563269c,0x7ec41d89)

◆ I_LAYER_INTERFACE

#define I_LAYER_INTERFACE   0x000A1001

◆ IBITMAPPAGER_INTERFACE_ID

#define IBITMAPPAGER_INTERFACE_ID   Interface_ID(0x48e1041f, 0x34c86c51)

Interface ID of the IBitmapPager interface.

◆ BITMAPIOMETADATA_INTERFACE_ID

#define BITMAPIOMETADATA_INTERFACE_ID   Interface_ID(0x56507912, 0x7e3c56db)

Interface ID of the BitmapIOMetaData interface.

Typedef Documentation

◆ BMMRES

using BMMRES = unsigned short

Traps the use of int or BOOL.

◆ MSTREntry

◆ MSTRList

◆ PBITMAP_FX_CALLBACK

typedef BOOL(WINAPI* PBITMAP_FX_CALLBACK) (LPVOID lpparam, int done, int total, const MCHAR *msg)

◆ BMM_IOHandlerEntry

◆ BMM_IOHandlerList

Enumeration Type Documentation

◆ ProjectionType

Enumerator
ProjPerspective 
ProjParallel 
@ ProjParallel
Definition: bitmap.h:545
@ ProjPerspective
Definition: bitmap.h:545

Function Documentation

◆ GetBitmapProxyManager()

BMMExport IBitmapProxyManager* GetBitmapProxyManager ( )

Returns the Bitmap Proxy Manager singleton object.

◆ DeclareBitmapAsset()

BMMExport void DeclareBitmapAsset ( IEnumAuxAssetsCallback enumCallback,
IAssetAccessor anAccessor,
BitmapInfo bitmapInfo,
int  flags = 0 
)

Declare a bitmap asset accessor to the specified callback.

Decorates the specified asset accessor as a bitmap enabled asset accessor before declaring it to the specified enumeration callback.

Parameters
[in]enumCallbackThe EnumAuxFiles callback to declare the asset to.
[in]anAccessorThe original asset accessor to decorate with proxy settings.
[in]bitmapInfoThe bitmap info of the bitmap. If NULL, the declared bitmap will always be treated as a single frame, no pi-data bitmap.
[in]flagsSpecify flags that define how the specified callback will declare the decorated accessor. Also controls how the accessor will be decorated.
See also
IEnumAuxAssetsCallback
IAssetAccessor

◆ ValidBitmapType()

int ValidBitmapType ( int  type)

◆ BMMCreateStorage()

BMMExport BitmapStorage* BMMCreateStorage ( BitmapManager manager,
UINT  type 
)
Remarks
This global function will create a new instance of the specified storage type and return a pointer to it.
Parameters:
BitmapManager *manager

The bitmap manager used for this storage.

UINT type

The type of storage to create. One of the following values:

BMM_LINE_ART
BMM_PALETTED
BMM_GRAY_8
BMM_GRAY_16
BMM_TRUE_16
BMM_TRUE_32
BMM_TRUE_64
Returns
The bitmap storage instance created or NULL if the specified type could not be created.
Data Members:
protected:

int openMode;

The mode the storage was opened in. See Bitmap Open Mode Types UINT usageCount;

The number of bitmaps using this storage.

BitmapManager *manager;

The bitmap manager associated with this storage.

int flags;

See Bitmap Flags int type;

See Bitmap Types BMM_Color_48 palette[256];

The palette entries (256 max). See Structure BMM_Color_48.

int paletteSlots;

The number of palette slots used.

UWORD *gammaTable;

The gamma correction table.

RenderInfo *rendInfo;

A pointer to an instance of RenderInfo. See Class RenderInfo.

BitmapInfo bi

Describes the properties of the bitmap associated with this storage.

◆ BMMCreateFilter()

BMMExport BitmapFilter* BMMCreateFilter ( BitmapManager manager,
UINT  type 
)

◆ BMMCreateDither()

BMMExport BitmapDither* BMMCreateDither ( BitmapManager manager,
UINT  type 
)

◆ BMMCalcPalette()

BMMExport int BMMCalcPalette ( Bitmap map,
int  colors,
BMM_Color_48 palette 
)

◆ BMMClosestColor()

BMMExport BYTE BMMClosestColor ( BMM_Color_64 color,
BMM_Color_48 palette,
int  colors 
)

◆ BMMGetBitmapTypeDescription()

BMMExport const MCHAR* BMMGetBitmapTypeDescription ( int  bitmapType,
DWORD  bitmapFlags 
)
Remarks
A global function in bitmap.h

Returns a localized string that describes one of the (BMM_TRUE_32, BMM_TRUE_64, etc.) bitmap types. The string is loaded into a static buffer and therefore should be used or copied immediately. The bitmap flags (from BitmapInfo::Flags()) are also used.
Parameters:

◆ OpenBMM()

BMMExport void OpenBMM ( BMMInterface *  i)

◆ CloseBMM()

BMMExport void CloseBMM ( )

◆ BMMGammaDlgProc()

INT_PTR CALLBACK BMMGammaDlgProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

◆ ExtractExtension()

void ExtractExtension ( const MCHAR string,
MCHAR ext,
size_t  extSize 
)

◆ BMMCreateNumberedFilename()

BMMExport int BMMCreateNumberedFilename ( const MCHAR namein,
int  frame,
MCHAR nameout 
)

Create a filename appended by the specified frame number.

This function will pad the filename with zeros.

Remarks
For example, an input filename of sampleKitchen.bmp and frame 4 results in sampleKitchen0004.bmp
Parameters
[in]nameinA pointer to the buffer containing the base filename from which to create a numbered filename.
[in]frameThe frame number to append. Can be BMM_SINGLEFRAME for convenience, which results in the original filename.
[out]nameoutA pointer to the buffer in which to store the created filename. This buffer must be large enough to accommodate the original filename, the digits of the framenumber, any zero-padding, and the file extension.
Returns
Zero if an error occurred, non-zero for success.
See also
BMMFindNumberedFilenames

◆ BMMFindNumberedFilenames()

BMMExport int BMMFindNumberedFilenames ( const MaxSDK::Util::Path baseFilename,
MaxSDK::Array< MaxSDK::Util::Path > &  foundFiles 
)

Retrieve a list of existing files in a sequence that matches the base filename and numbering of the specified filename.

Remarks
For example, a filename of sampleKitchen0001.bmp will return all existing files that match sampleKitchenxxxx.bmp, such as all files from sampleKitchen0000.bmp to sampleKitchen0060.bmp. This is similar to the sequence detection used in the Image File List (IFL) image format.
Parameters
[in]baseFilenameThe filename to match.
[out]foundFilesThe list of matching files found. This list is cleared by the function.
Returns
The number of matching files found. Zero if none found or an error occurred.
See also
BMMCreateNumberedFilename

◆ BMMIsFile()

BMMExport BOOL BMMIsFile ( const MCHAR filename)

◆ BMMSplitFilename()

BMMExport void BMMSplitFilename ( const MCHAR name,
MCHAR directory,
size_t  directorySize,
MCHAR filename,
size_t  filenameSize,
MCHAR extension,
size_t  extensionSize 
)

Splits up a file path into three strings, the directory name, file name, and file extension.

The three out parameters are allowed to be NULL. For non-NULL parameters you must specify the size in characters of the buffer. If the buffer is not big enough to hold the output (including a null terminator), the result is truncated.

Parameters
[in]nameThe full path to the file to be split
[out]directoryA string containing the directory portion of the file path
[in]directorySizeThe size in characters of the directory buffer
[out]filenameA string containing the file name portion of the file path
[in]filenameSizeThe size in characters of the filename buffer
[out]extensionA string containing the file extension portion of the file path
[in]extensionSizeThe size in characters of the extension buffer

◆ BMMGetLastErrorText()

BMMExport LPMSTR BMMGetLastErrorText ( LPMSTR  lpszBuf,
DWORD  dwSize 
)

◆ BMMNewQuantizer()

BMMExport Quantizer* BMMNewQuantizer ( )

◆ BMMAppendSlash() [1/2]

BMMExport void BMMAppendSlash ( MCHAR path)

This function appends a slash character to the end of the path passed unless one already exists.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ BMMRemoveSlash() [1/2]

BMMExport void BMMRemoveSlash ( MCHAR path)

This function removes the slash character from the end of the path passed if present.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ BMMAppendSlash() [2/2]

BMMExport void BMMAppendSlash ( MSTR path)

This function appends a slash character to the end of the path passed unless one already exists.

Parameters
[in,out]pathThe path name to append.

◆ BMMRemoveSlash() [2/2]

BMMExport void BMMRemoveSlash ( MSTR path)

This function removes the slash character from the end of the path passed if present.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ BMMGetUniversalName()

BMMExport BOOL BMMGetUniversalName ( MCHAR out_uncname,
size_t  in_uncnameSize,
const MCHAR in_path 
)

◆ BMMFindNetworkShare()

BMMExport BOOL BMMFindNetworkShare ( const MCHAR in_localpath,
MCHAR out_sharename,
MCHAR out_sharepath 
)

◆ BMMGetLocalShare()

BMMExport BOOL BMMGetLocalShare ( const MCHAR local_path,
MCHAR share 
)

◆ BMMNewColorPacker()

BMMExport ColorPacker* BMMNewColorPacker ( int  w,
BMM_Color_48 pal,
int  npal,
BYTE *  remap = nullptr 
)

◆ FixPaletteForWindows()

BMMExport void FixPaletteForWindows ( BMM_Color_48 pal,
BMM_Color_48 newpal,
int  ncols,
BYTE *  remap = nullptr 
)
Remarks
Rearranges the palette pal (which has colors 0..ncols-1 occupied, in descending order of frequency), into newpal so that the colors 10-245 are populated first, then 0-9, then 246-255. Sets the optional array remap to map the old palette index values to the new ones.
Parameters:
BMM_Color_48 *pal

The palette to rearrange.

BMM_Color_48 *newpal

The rearranged palette.

int ncols

The number of colors in the palette.

BYTE *remap=NULL

An array that maps the old palette index values to the new ones.

◆ GetIBitmapPager()

IBitmapPager* GetIBitmapPager ( )
inline

Returns the Bitmap Pager singleton object.

#define IBITMAPPAGER_INTERFACE_ID
Interface ID of the IBitmapPager interface.
Definition: bitmap.h:5775
Definition: bitmap.h:5786
CoreExport Interface * GetCOREInterface()

Variable Documentation

◆ TheSystemFrame

int TheSystemFrame
extern

External data.

◆ TheManager

BMMExport BitmapManager* TheManager
extern

The Primary Bitmap Manager Object.