G
Guest
Hi there,
I am currently writing an application where one inspects images and
annotates certain features. Thus, one has to zoom in (4x) and pan around. The
features are marked with little red rectangles.The images are 2048x2048
pixels.
It seems that I can find no efficient way to implement both zooming and
panning.
At present I have a panel with autoscroll set to true inside which there is
a pictureBox in which I can draw both the images and the rectangles. This
allows me to efficiently pan the image. However, zooming is a pain:
Displaying a 2048x2048 image at four times its size is fun to pan, but
getting it to display in the first place takes forever. I assume this is
because it needs to first transfer all the data to the graphics card which is
slow.
Previously I had done it a different way: I hod no panel but only a
pictureBox. In that I drew whichever portion of the image I displayed. This
made zooming in quite fast but panning was a pain because again it had to
transfer that portion to the graphics card each time the image moved.
Does anybody have a better idea how this can be done?
Thanks in advance for any help you can offer!
Regards,
Marcus
I am currently writing an application where one inspects images and
annotates certain features. Thus, one has to zoom in (4x) and pan around. The
features are marked with little red rectangles.The images are 2048x2048
pixels.
It seems that I can find no efficient way to implement both zooming and
panning.
At present I have a panel with autoscroll set to true inside which there is
a pictureBox in which I can draw both the images and the rectangles. This
allows me to efficiently pan the image. However, zooming is a pain:
Displaying a 2048x2048 image at four times its size is fun to pan, but
getting it to display in the first place takes forever. I assume this is
because it needs to first transfer all the data to the graphics card which is
slow.
Previously I had done it a different way: I hod no panel but only a
pictureBox. In that I drew whichever portion of the image I displayed. This
made zooming in quite fast but panning was a pain because again it had to
transfer that portion to the graphics card each time the image moved.
Does anybody have a better idea how this can be done?
Thanks in advance for any help you can offer!
Regards,
Marcus