-
In this example the viewport is zoomed out and the image is on the middle. I'd like to know how I could get the bounds of the image at any given position. I'd appreciate it. 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The image bounds are in viewport coordinates, which don't change when you zoom or pan, so you can get them whenever you want. Assuming you just have a single image, you can get them like so:
Depending on what you want to do, you might want to convert those into one of the other coordinate systems. There are a lot of conversion functions for that. See https://openseadragon.github.io/examples/viewport-coordinates/ for more information on coordinate systems. |
Beta Was this translation helpful? Give feedback.
Thanks for your answer! I didn't formulate the question well, what I actually meant was to get the bounds of the image including x and y relative to the whole viewport. I also needed the value in px, I achieved it in this way: