Hi,
I am writing a Plug-in in Rhino Python. One of the functionalities is to trigger the rendering process and then save and close the render window. Now, I would like to save the rendered image at two resolutions:
- Full-res
- Resized to the web-acceptable size
Ideally, I would use PIL (pillow) module from Python to resize the image, but that’s not available in IronPython. I didn’t find anything useful in System. Drawing either. It is important, that the solution can be integrated into the plug-in to later be compiled into the .yak package.
The current code just uses the last RenderSettings and gets the image out.
def render_viewport(render_path):
Rhino.RhinoApp.RunScript("_Render",False)
Rhino.RhinoApp.RunScript("_-SaveRenderWindowAs " + '"' + render_path + '"', True)
Rhino.RhinoApp.RunScript("_-CloseRenderWindow ",True)
Does anyone have any idea?
Best,
WK