Grasshopper capture views at specific area

Hi, I wander if we can capture view at the specific area instead of the screen. In the image, what I want is to capture the image inside the rectangular.

In Ladybug_Capture View, there is a “keepAspectRatio” button, however it doesn’t understand which area I want to capture.

You can set a Named view in Rhino and then use the viewNames input to capture a particular area of the screen

Yes, I have the named view, but the result doesn’t obey the view.
I think it’s still not clear for the code about what is the meaning of imageWidth and imageHeight in pixel.
CaptureViewTest.3dm (24.5 KB)
CaptureViewTest.gh (16.5 KB)

Please disconnect imageWidth and imageHeight when you’re using a named view from Rhino.


With that I could generate this image

The imageWidth and imageHeight can ensure the quality.

Do you think it’s possible to only capture the red area precisely without white part outside the rectangular. I have more than a hundred images in different ratios.

I was trying to keep transparent background and give the area a white color, so I have a png in the right ratio and quality. However, this rectangular white color will overlap the other colored mesh.

You can set the view and expand the window to full screen. Is not exactly what you want but you’ll get a decent size.
-A.