Openseadragon: Get image dimensions

Created on 24 Nov 2017  路  1Comment  路  Source: openseadragon/openseadragon

This may be very silly, but how can I get the image dimensions after having loaded an image? I need them to do some calculations on the svg overlays.

question

Most helpful comment

Assuming you just have a single image, it would be:

viewer.world.getItemAt(0).getContentSize();

That gets you the actual pixel dimensions of the image, not its location in the viewport.

>All comments

Assuming you just have a single image, it would be:

viewer.world.getItemAt(0).getContentSize();

That gets you the actual pixel dimensions of the image, not its location in the viewport.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stone12379 picture stone12379  路  4Comments

htmllancer picture htmllancer  路  5Comments

sommour picture sommour  路  5Comments

maxrottersman picture maxrottersman  路  4Comments

xlb picture xlb  路  3Comments