Working with Bitmaps

The Bitmap class provides storage for 3ds Max bitmaps and low-level access to them.

For example, to create a bitmap of a specified height and width and gamma setting, and then store render results in it:

from pymxs import runtime as rt

rt.resetMaxFile(rt.name('noPrompt'))
t = rt.teapot()
my_bitmap = rt.bitmap(320, 240, color=rt.white, gamma=1.9)
rt.render(to=my_bitmap)
rt.display(my_bitmap)

Note that render() returns a bitmap by default if no to= or outputFile= is supplied, but once a bitmap value is created you cannot change the gamma value or pixel aspect. In this example we create the bitmap with these values first, and then write to it. You can also copy a bitmap to a new one with the gamma or pixel aspect you want to acheive the same thing.