3ds Max C++ API Reference
|
Base class for image IO plugins. More...
#include <bitmap.h>
Public Member Functions | |
BMMExport int | GetOutputPixels (int x, int y, int pixels, BMM_Color_fl *ptr, BOOL preMultAlpha=TRUE) |
BMMExport | BitmapIO () |
virtual BMMExport | ~BitmapIO () |
void | SetPrev (BitmapIO *prev) |
void | SetNext (BitmapIO *next) |
BitmapIO * | Prev () |
BitmapIO * | Next () |
virtual BMMExport BOOL | ValidatePiData (BitmapInfo *pbi, ILoad *iload=nullptr) |
This is used to make sure plugin data on the BitmapInfo belongs to this plugin. | |
virtual BMMExport PAVIFILE | GetPaviFile () |
BMMExport void | InitOutputGammaTable (BitmapInfo *pbi) |
Output Pixels | |
BMMExport int | GetOutputPixels (int x, int y, int pixels, BMM_Color_64 *ptr, BOOL preMultAlpha=TRUE) |
BMMExport int | GetDitheredOutputPixels (int x, int y, int pixels, BMM_Color_32 *ptr, BOOL preMultAlpha=TRUE) |
DIB Access | |
BMMExport PBITMAPINFO | GetOutputDib (int depth=24) |
BMMExport PBITMAPINFO | GetDitheredOutputDib (int depth=24) |
Output Gamma Setting | |
BMMExport float | OutputGamma () |
Dithering | |
BMMExport BOOL | DitherTrueColor () |
BMMExport BOOL | DitherPaletted () |
Palette Computation | |
BMMExport int | CalcOutputPalette (int palsize, BMM_Color_48 *pal) |
Open Mode Setting | |
int | OpenMode () |
Storage / Bitmap Access | |
BMMExport BitmapStorage * | Storage () |
Bitmap * | Map () |
Filename Extensions | |
virtual BMMExport int | ExtCount ()=0 |
virtual BMMExport const MCHAR * | Ext (int n)=0 |
Author/Desc/Copyright/Version | |
virtual BMMExport const MCHAR * | LongDesc ()=0 |
virtual BMMExport const MCHAR * | ShortDesc ()=0 |
virtual BMMExport const MCHAR * | AuthorName ()=0 |
virtual BMMExport const MCHAR * | CopyrightMessage ()=0 |
virtual BMMExport UINT | Version ()=0 |
Capabilities | |
virtual BMMExport int | Capability ()=0 |
ShowAbout / ShowImage / ShowControl | |
virtual BMMExport void | ShowAbout (HWND hWnd)=0 |
virtual BMMExport BOOL | ShowImage (HWND hWnd, BitmapInfo *pbi) |
virtual BMMExport BOOL | ShowControl (HWND hWnd, DWORD flag) |
BitmapIO Methods | |
The following methods (EvaluateConfigure(), LoadConfigure(), and SaveConfigure()) deal with BitmapIO loading and saving. See the sample code below to know how the EPS BitmapIO plug-in uses these methods. typedef struct userSettable {
int units; // Inches or MM
int binary; // Whether want binary image data or not
int preview; // Whether want TIFF preview in file
int orientation; // Options are portrait or landscape
int colorType; // Whether image is output as rgb or gray
float paperHeight; // Height of output (for centering image)
float paperWidth; // Width of output (for centering image)
float xResolution; // In dots per inch
float yResolution; // In dots per inch
} UserSettable;
DWORD BitmapIO_EPS::EvaluateConfigure () {
return sizeof (UserSettable);
}
BOOL BitmapIO_EPS::LoadConfigure (void *ptr) {
UserSettable *buf = (UserSettable *) ptr;
memcpy (&userSettings, ptr, sizeof(UserSettable));
return TRUE;
}
BOOL BitmapIO_EPS::SaveConfigure (void *ptr) {
if (ptr) {
memcpy (ptr, &userSettings, sizeof(UserSettable));
return TRUE;
} else
return FALSE;
}
| |
virtual BMMExport DWORD | EvaluateConfigure ()=0 |
virtual BMMExport BOOL | LoadConfigure (void *ptr, DWORD piDataSize)=0 |
virtual BMMExport BOOL | SaveConfigure (void *ptr)=0 |
Default Options | |
These Cfg methods provide access to the default options of BitmapIO, as saved in its .cfg file. The options control how files are saved to disk (JPEG compression and smoothing, for example). Formerly, most BitmapIO types implemented these methods, yet they were not derived from any superclass. The method definitions are now moved to the BitmapIO superclass, so they can easily be called on any subclass. Note: Introduced in 3ds Max 6 SDK. | |
virtual BMMExport void | GetCfgFilename (MCHAR *filename) |
virtual BMMExport BOOL | ReadCfg () |
virtual BMMExport void | WriteCfg () |
Silent Mode Setting | |
BMMExport BOOL | SilentMode () |
BMMExport BMMRES | GetFrame (BitmapInfo *fbi, int *frame) |
Critical Error Handling | |
BMMExport BMMRES | ProcessImageIOError (BitmapInfo *pbi, const MCHAR *string=nullptr) |
BMMExport BMMRES | ProcessImageIOError (BitmapInfo *pbi, int errorcode) |
G-Buffer Channels Required | |
virtual BMMExport DWORD | ChannelsRequired () |
Image Information | |
virtual BMMExport BMMRES | GetImageInfoDlg (HWND hWnd, BitmapInfo *pbi, const MCHAR *filename=nullptr) |
virtual BMMExport BMMRES | GetImageInfo (BitmapInfo *pbi)=0 |
virtual BMMExport BMMRES | GetImageName (BitmapInfo *pbi, MCHAR *filename) |
virtual BMMExport void | EvalMatch (MSTR &matchString) |
Loading | |
virtual BMMExport BitmapStorage * | Load (BitmapInfo *pbi, Bitmap *pmap, BMMRES *status)=0 |
Output / Write / Close | |
virtual BMMExport BMMRES | OpenOutput (BitmapInfo *pbi, Bitmap *pmap) |
Opens the image for writing to file. | |
virtual BMMExport BMMRES | Write (int frame) |
virtual BMMExport int | Close (int flag) |
![]() | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport int | NumInterfaces () const |
virtual UtilExport BaseInterface * | GetInterfaceAt (int i) const |
virtual UtilExport | ~BaseInterfaceServer () |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Public Attributes | |
BitmapInfo | bi |
Describes the properties of the bitmap being handled by the instance of this class. | |
Protected Attributes | |
float | gamma = 0.f |
The gamma setting. | |
Bitmap * | map = nullptr |
The Bitmap using this OUTPUT handler. | |
BitmapStorage * | storage = nullptr |
The BitmapStorage used by this INPUT handler. | |
int | openMode = 0 |
The mode that the IO module is open for - see Bitmap Open Mode Types. | |
BitmapIO * | prevIO = nullptr |
A linked list pointer to the previous IO module for multiple outputs of a single bitmap. | |
BitmapIO * | nextIO = nullptr |
A linked list pointer to the next IO module for multiple outputs of a single bitmap. | |
![]() | |
Tab< BaseInterface * > | interfaces |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_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. | |
Base class for image IO plugins.
See BitmapIOMetaData for more information.
BMMExport int GetOutputPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_64 * | ptr, | ||
BOOL | preMultAlpha = TRUE |
||
) |
BMMExport int GetDitheredOutputPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_32 * | ptr, | ||
BOOL | preMultAlpha = TRUE |
||
) |
BMMExport int GetOutputPixels | ( | int | x, |
int | y, | ||
int | pixels, | ||
BMM_Color_fl * | ptr, | ||
BOOL | preMultAlpha = TRUE |
||
) |
BMMExport float OutputGamma | ( | ) |
BMMExport BOOL DitherTrueColor | ( | ) |
BMMExport BOOL DitherPaletted | ( | ) |
|
inline |
|
inline |
|
inline |
BMMExport BitmapStorage * Storage | ( | ) |
|
inline |
|
pure virtual |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
ptr | - Pointer initialized to point to the previously saved configuration data. |
piDataSize | - The size of the previously saved configuration data. |
ptr | - Pointer initialized to a pre-allocated buffer where the plug-in may save data. |
|
inlinevirtual |
|
virtual |
This is used to make sure plugin data on the BitmapInfo belongs to this plugin.
It is also called on file load to allow the plugin to version the plugin data. In this case, the iload parameter will be non-NULL. If a plugin implements this method, it must first call the method on BitmapIO and immediately return false if that implementation returns false.
[in] | pbi | The BitmapInfo holding the plugin data |
[in] | iload | The ILoad* if called when loading the BitmapInfo from a scene file, NULL otherwise. |
BMMExport BOOL SilentMode | ( | ) |
BMMExport BMMRES GetFrame | ( | BitmapInfo * | fbi, |
int * | frame | ||
) |
BMMExport BMMRES ProcessImageIOError | ( | BitmapInfo * | pbi, |
const MCHAR * | string = nullptr |
||
) |
BMMExport BMMRES ProcessImageIOError | ( | BitmapInfo * | pbi, |
int | errorcode | ||
) |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
|
inlinevirtual |
|
pure virtual |
|
virtual |
Opens the image for writing to file.
pbi | - The image information. |
pmap | - Points to the bitmap to save. |
|
inlinevirtual |
BMMExport void InitOutputGammaTable | ( | BitmapInfo * | pbi | ) |
|
protected |
The gamma setting.
|
protected |
The BitmapStorage used by this INPUT handler.
|
protected |
The mode that the IO module is open for - see Bitmap Open Mode Types.
|
protected |
A linked list pointer to the previous IO module for multiple outputs of a single bitmap.
|
protected |
A linked list pointer to the next IO module for multiple outputs of a single bitmap.
BitmapInfo bi |
Describes the properties of the bitmap being handled by the instance of this class.