Hello everyone,
I have a problem.
I have an image that comes from a camera.
I stretch the image inside a Viewbox which is 877*877 px big.
The camera image can have a resolution fromm 100*100 px to 3000*3000 px.
Right now the complete image is stretched inside the ViewBox with the help of Windows.ScaleTransform.
I also have a zoom function in the software which works correctly. It also works with Windows.ScaleTransform.
It looks like this:
http://i.stack.imgur.com/tZJGI.png[
^]
Now to my problem: The zoom factor has to be 100% (1) when the camera is image is 877*877, but it is always 100% when the zoom is not working.
When the Viewbox show's a stretched 3000x3000 px image the zoom should be 29% and not 100%.
Any idea how I can manage this?
I am looking forward to an answer.
Greetings
Richard
What I have tried:
I tried to calculate the resolution difference between the Image and the Viewbox
And
I tried to calculate the zoom factor