CreatingPyramidalTIFFs

Mathieu Malaterre edited this page Dec 16, 2013 · 3 revisions

OpenSlide can read generic tiled TIFF files. OpenSlide does not require these files to store their image data at multiple resolutions (to be pyramidal), but many viewers do.

There are multiple tools that will create a pyramidal tiled TIFF.

ImageMagick ≥ 6.7.3-8

convert input.tiff -compress jpeg -quality 90 -define tiff:tile-geometry=256x256 ptif:output.tiff

VIPS ≥ 7.28

vips tiffsave input.tiff output.tiff --compression=jpeg --Q=90 --tile --tile-width=256 --tile-height=256 --pyramid

Pay attention that some VIPS version do not work quite well with JPEG, so instead you could use 'deflate', see for instance: http://bugs.debian.org/714984#48

vips tiffsave input.tiff output.tiff --compression=deflate --tile --tile-width=256 --tile-height=256 --pyramid