I am using Rhino.Display.ViewCapture.CaptureToBitmap(ViewCaptureSetting) to capture high resolution screenshot of a model. I remember when I was running this method before the most recent Rhino update, the display mode for the view capture follows my active viewport display mode. However, now the image is always in wireframe mode. Is there a way to specify the display model in the ViewCaptureSetting?
The example works.
However, I want to control the dpi and boundary of the image and use the static method Rhino.Display.ViewCapture.CaptureToBitmap(ViewCaptureSetting).This method is now always capturing the image in wireframe mode. Is there a way to specify dpi using Rhino.Display.ViewCapture.CaptureToBitmap(RhinoView) method? Thanks.
If I am not mistaken, the static function you are calling always outputs vectors. Thus you’ll always get wireframe. This method is primarily used for printing to PDF or SVG.
Is there a reason you don’t just modify the sample I referenced, which does an actual “view capture”?
That static method was working for me. It did output bitmap image in shaded mode. I think it is not working after I update my Rhino to the latest version, but I am not 100% sure.
I need my image size to adjust to the objects bounding box and also at the correct pixel per inch. For example, if the object is 10"x20" in top view, I want the image to be 1000px x 2000px. So 100px=1" in the image. I can specify both the size and dpi in ViewCaptureSetting and use Rhino.Display.ViewCapture.CaptureToBitmap(ViewCaptureSetting) to capture the image in the correct size. I do not know how to achieve the same result with Rhino.Display.ViewCapture.CaptureToBitmap(RhinoView).
I found the solution.
In Rhino 6 SR29, one of the bug fix is: ViewCaptureSettings RasterMode = False should return VCS in wireframe (RH059034). Since, the default value for RasterMode is false, ViewCaptureSettings will default to wireframe mode after SR29. If I set RasterMode=true, the image captured can be in the display mode of the viewport.
Hi @AlanTai@dale. I see that the same problem is happening with rhino7, I set RasterMode=true and I keep getting the vector result. how can I solve this ?
We’re going to need more information on what you are trying to do. Having some code, we can run here, that isn’t working for you is always helpful.
thanks @dale for your reply. yes sure :
I am trying to get a specific image I already sat up the boundary and everything works, I need to get the image with the render view. not with the lines. I used RasterMode=true but it didnt work.