Getting the EXACT tilesize of an image
jcupitt at gmail.com
jcupitt at gmail.com
Sun Mar 24 16:27:05 EDT 2019
Hello Martin,
On Sun, 24 Mar 2019 at 19:25, Martin Weihrauch
<m.weihrauch at smartinmedia.com> wrote:
> I have the following question: To quickly serve tiles out of formats, I wanted to know: is there the possibility to get the exact tilesize of an image through OpenSlide?
Yes! I asked Benjamin this precise question back in 2011 and he very
kindly added the feature for me. libvips uses it to size the tilecache
it uses for openslide images.
You can read the tilesize out of the openslide metadata like this:
$ vipsheader -a CMU-1.svs | grep tile
openslide.level[0].tile-height: 256
openslide.level[0].tile-width: 256
openslide.level[1].tile-height: 256
openslide.level[1].tile-width: 256
openslide.level[2].tile-height: 256
openslide.level[2].tile-width: 256
I'm not sure if this was ever documented: it went in as an
experimental feature. It gives a useful speedup.
John
More information about the openslide-users
mailing list