Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision.WindowsForms.ImageViewer.ZoomToFit works only until manually zoomed

I am displaying a live camera image in a Vision.WindowsForms.ImageViewer (in C#). Whenever the user changes the camera resolution (Binning / Roi) I want the image to be scaled to the full Viewer size. This works well by setting ImageViewer.ZoomToFit to true. But once the user has zoomed in/out manually the zoom factor remains fixed. This results in the image not filling the viewer any more when it's resolution is changed. Can I reset the Viewer to zoom to fit again after the image resolution has changed? A manual call would be fine. Setting ZoomToFit again doesn't work. Thanks in advance for youre help
0 Kudos
Message 1 of 2
(3,361 Views)

Hi Neutronensturm

 

When resizing an ImageViewer in a C application with the ZoomToFit property set to true, the image size remains constant instead of filling the ImageViewer area.

This is a known issue with .NET and the ImageViewer, and has been filed as CAR 188008

 

For a workaround please have a look at this post:

 

ImageViewer canvas does not resize when the ImageViewer control is resized .NET

 

Hope that helps ?

 

Kind regards

Pixar

 

 

 

0 Kudos
Message 2 of 2
(3,340 Views)