Unsupported TIFF Compression

I am using openslide-python to open an svs image, and I ran into the following problem:

 >> import openslide as osi >> a = osi.OpenSlide('image.svs') 

gives an error

 TIFFReadDirectory: Warning, Unknown field with tag 347 (0x15b) encountered. image.svs: JPEG compression support is not configured. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/manan/anaconda/lib/python2.7/site-packages/openslide/__init__.py", line 154, in __init__ self._osr = lowlevel.open(filename) File "/home/manan/anaconda/lib/python2.7/site-packages/openslide/lowlevel.py", line 178, in _check_open raise OpenSlideError(err) openslide.lowlevel.OpenSlideError: Unsupported TIFF compression: 7 

I could not find a solution to this problem on the Internet; I checked libopenjpeg and any additional relevant libraries to make sure they are in their latest relevant versions.

+6
source share
1 answer

If you look at the code: https://github.com/openslide/openslide/blob/7b99a8604f38280d14a34db6bda7a916563f96e1/src/openslide-vendor-generic-tiff.c#L222-L226

 if (!TIFFIsCODECConfigured(compression)) { g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, "Unsupported TIFF compression: %u", compression); goto FAIL; } 

You will see that it uses libtiff : the TIFFIsCODECConfigured function TIFFIsCODECConfigured provided by the TIFFIsCODECConfigured core library (see the man page ).

The compression tag has a value of 7 ; it is an unusually supported JPEG ('new-style' JPEG) compression scheme JPEG ('new-style' JPEG) , sometimes also called JPEG-in-TIFF ; for which you need to install a codec.

If you still have slides and are used, for example. Kodak Imaging, then you can scan them again with a different compression; but that would be the other way around. It is probably easier to try and add a codec and include it in libtiff .

From libtiff documentation :

JPEG compression support is controlled by JPEG_SUPPORT. The JPEG codec that ships with libtiff is designed to be used with the release of version 5 or later of the freeware Independent JPEG Group software. This software is available from ftp.uu.net:/graphics/jpeg/.

Therefore, support is optional, and you may need to rebuild libtiff (see instructions ).

By default, JPEG support is not configured.

Literature:

+5
source

All Articles