Getting getViewportDib() to a file ?
How can you retrieve an image of a viewport and then save it to a file without using the "Grab Viewport" macro. After a bit researching I found that getViewportDib() or view.getViewportDib() will get the bitmap image of the view but how can you save this to a file name, location, and type, jpeg or png, with no dialog boxes ?
Any help would be appreciated, thanks.
Comments
Thanks, those methods worked
Thanks, those methods worked like a charm. A little off topic but why the fudge can't programming languages like maxscript, auto and visual lisp, corelscript and probably many others simply cannot read a text file, skip down to a line, then replace that line with new content and be on your way. Its absurd how you have to read a line, then write it to a separate open file over and over just to change one line, makes no sense to me all. You can open a file and append to the end of it ?? Is there technical reason that makes this seem impossible to do ?
Thanks for the saving viewport to a file info.
.
appending is easy. check mxs reference on reading/writing to filestream.
.
.
Tools and Scripts for Autodesk 3dsMax
.
Tools and Scripts for Autodesk 3dsMax
.
:)
.
Yep, shorter. :)
When the snapshot must be bigger than the actual viewport the pasteBitmap can't be avoided. :)
Tools and Scripts for Autodesk 3dsMax