Message 1 of 1
RenderBitmap can't export correctly when the BitmapTex with output info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, all:
I have tried to export bitmap from texmap with the function RenderBitmap of MaxPlus. The code is as follows:
bitmap_filename = 'test.jpg' # Create a bitmap rendbm = MaxPlus.Factory.CreateBitmap() # BMM_TRUE_64 = 7 BMM_TRUE_32 = 6 storage = MaxPlus.Factory.CreateStorage(BMM_TRUE_32) # Now we can get the bitmap info info = storage.GetBitmapInfo() # Set some common properties on the bitmap info.SetWidth(1024) info.SetHeight(1024) # Set Gama info.SetGamma(1.0) info.SetCustomGamma(1.0) info.SetBitmapType(BMM_TRUE_32) # Allocate storage for writing to the bitmap storage.Allocate(info, 2) # Set the storage on the bitmap rendbm.SetStorage(storage) # Set the bitmap output base file name info.SetName(bitmap_filename) texmap.RenderBitmap(rendbm,1.0,True,MaxPlus.Now()) rendbm.OpenOutput(info) rendbm.Write(info) rendbm.Close(info)
However, it could not export the correct image when the output of BitmapTex is set, such as inverted or RGB offset and so on. Seems that it can't recognize the output info.
Is anybody facing the same problem? Any suggestion is appreciated in advance.