How to keep the origin image size with different screen

320 views Asked by At

I want to put some images on the screen.Then i choose openseadragon plugin to help me. But i have two questions by using it.

  1. Each pic is 256*256 sizeļ¼Œbut on my mac, is always biger than 256. As below pic shows.

  2. I open it on other screens which is bigger than mine, it also show me bigger. Maybe is the same quesion as question above.

Can any body give me same help? Thanks very much!

Actually it should be 256 * 256, but acutally 264.74 * 264.74

Is similar to 256,but still bigger.

1

There are 1 answers

0
Mark Salsbery On

The closest you're going to get to displaying tiles with a 1/1 ratio of image pixels to screen pixels is by setting the viewer zoom correctly. Since viewer zoom is based on the width of the image, you'll need that value to compute it...something like:

  viewer.viewport.zoomTo(imgWidth / viewer.container.clientWidth);