panzoom integration in pictureBox

1
0

I have implemented pan / zoom on a server-side picturebox, but due to some latency on the web it is not performing (300 dpi images).
My aim is to be able to draw rectangles / lines on the image and obtain the absolute coordinates.
I was wondering if and how it was possible to integrate https://github.com/anvaka/panzoom  to the picturebox control

  • You must to post comments
0
0

Here’s a sample. Hope it gives you a general idea on how to make clever use of the Movable property.

Replace the sample image with one of your own to test it with different sizes.

(You can move and resize the red box)

  • You must to post comments
0
0

This would be something I’d like too.

I’ve created an application which uses instrumentation diagrams and these images are over 5000 by 3500 pixels give or take. The panning is easy to implement in WiseJ by clever using the “Moveable” property. My application has over 400 objects which are drawn over the big image and these objects can be selected, moved and resized. The Movable property (as far as I know) is handled on the client which makes it super fast. I could be wrong but though.

Anyway, if you’d like to try this:

  1. Place a Panel on a page with Dock =Fill and AutoScroll = True
  2. Place a picturebox inside the panel with SizeMode = AutoSize and Anchor = None and select a large image and Location = 0;0 and Moveable = True
  3. Select a large picture to show in the picturebox

 

Now run the application and try dragging the image arround.

To get the cursor position in relation to the image you can use the MousePosition and the scrollbar offsets of the Panel.

I’ve not been able to implement zooming because of memory issues so if WiseJ could implement pan/zoom that would be so cool!

Attached a screenshot of the application with picturebox panning. The red squares are selectable object, the numbers are movable in realtime.

Attachment
  • Davide Mercanti
    Nice. Can we get in touch with a private message?
  • vincent_
    There’s no private messaging here but I’ll provide a sample application for you to try. The rest is up to you :) Also, this might help others too and maybe features like this will get immplemented by WiseJ ;)
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.