Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I convert from resolution independent to pixel coordinates?

0
10 Posted

How can I convert from resolution independent to pixel coordinates?

0
10

Early versions of the Zoomify Viewer made use of ‘resolution independent coordinates’ to specify and position hotspots within a zoomable image. This coordinate system represents an image using a span from a value of negative 1 to positive 1 both vertically and horizontally. Accordingly, the center of the image is represented as 0,0 while the far upper left corner would be represented as -1,-1. All recent versions (v3 and above) of the Zoomify Viewer make use of the simpler and more intuitive pixel coordinate representation. Using this approach, the position of a hotspot within a zoomable image is simply the number of pixels from the left side of the image and the number of pixels from the top of the image. The center of an image that is 1000 pixels wide and tall would therefore be 500,500 while the upper left corner would always be 0,0. It may be desirable under certain circumstances to convert between these coordinate systems. The functions below accomplish this task. Note that these

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123