Capture rhino viewport when running grasshopper headlessly

I am running grasshopper headlessly thanks to rhino inside.

Is it possible to create a Rhino doc, set a viewport, adjust the camera, and capture a viewport into a raster file?

I hope that something like below would be possible

var doc = Rhino.RhinoDoc.ActiveDoc;
var view = doc.Views.ActiveView;
var viewportImage =view.CaptureToBitmap();

viewportImage.Save("C:/Users/myName/Desktop/image.png");

Hi @archicoder,

This is currently not possible. We need to tune our display architecture to be able to capture when running in headless mode.

– Dale

Thanks, Dale!
I appreciate your quick response.

Best,
Filip