Hi I am aware that RenderBitmap and RenderTexmap can be used in the SDK
However, as far as I have tested, these functions work with BMM_TRUE_32
Below is my code and it fails when the bitmap is of BMM_TRUE_24 type
BitmapInfo newBmpInfo(bm->GetBitmapInfo());
newBmpInfo.SetWidth(newWidth);
newBmpInfo.SetHeight(newHeight);
Bitmap* newBmp = TheManager->Create(&newBmpInfo);
bmtex->RenderBitmap(GetCOREInterface()->GetTime(), newBmp, 1.0, TRUE); //This will fail if newBmpInfo is of BMM_TRUE_24 type
newBmp->OpenOutput(&newBmpInfo);
newBmp->Write(&newBmpInfo);
nnewBmp->DeleteThis();
I then checked renderMap in maxscript and it seems to work alright for _24 types. Any pointers to achieve similar in C++?
accoding to SDK <bitmap.h>:
//-- Information Only
#define BMM_TRUE_24 8 //!< 24-bit color: 8 bits each for Red, Green, and Blue. Cannot be written to.
#define BMM_TRUE_48 9 //!< 48-bit color: 16 bits each for Red, Green, and Blue. Cannot be written to.
there is no point in rendering in 24, as well as in 32. Render in 64, and then save it in any file format you need
I am trying to resize texture bitmap using RenderBitmap
Some files don't have alpha info, and using 32 or 64 will add another channel in the default files which will increase the size of the texture on the disk. What do you think?
it is up to you how to save the bitmap to a file. For example, if you save a 64-bit bitmap as a BMP file, it will still be saved as 24-bit. If you are saving as TIF, you have the option to save with or without alpha channel. etc..
Can't find what you're looking for? Ask the community or share your knowledge.