Openseadragon: how to display the max level only?

Created on 3 Jul 2020  路  3Comments  路  Source: openseadragon/openseadragon

for example. i hava a big picture.it has 8 levels.usually i see 8,9,10,11.. .but now just want see the 16 only.it means i have only one layer.or how can i replace the 16 level by a twice width,twice heigt image replace; just like this.for a clearer image

tileSource = {
width:width * 2,
height: width * 2,
tileSize:.titleSize * 2,
tileOverlap: 1
}

question

All 3 comments

I鈥檓 not sure what you mean by level 16 on an image that has only 8 levels, but if you want a zoom factor of 2 times the native image size then something like this...

viewer.viewport.zoomTo((2.0 * this.imgWidth) / viewer.viewport.getContainerSize().x

...will give zoom factor of 2.0. Note if your viewer is resizable then you鈥檒l have to zoomTo any time the size changes.

The OpenSeadragonImagingHelper plugin has methods to set the zoom factor and hold the zoom factor if viewport size changes

You'll want to set maxZoomPixelRatio: 2 as well, so it'll allow you to zoom in that far.

You'll want to set maxZoomPixelRatio: 2 as well, so it'll allow you to zoom in that far.

I think I need to add that to the ImagingHelper plugin, thanks!

Was this page helpful?
0 / 5 - 0 ratings