openslide-users Digest, Vol 64, Issue 2
Ryan Murray
ryan.z.murray at helsinki.fi
Thu May 7 05:47:11 EDT 2015
Hi Mathieu,
> If you want to try for yourself, you can download the latest kakadu
> demo tools and play with the kdu_compress command. Since kdu_compress
> support BigTiff You may be able to play with some openslide demo data.
> I would suggest something like this to start:
>
> $ kdu_compress -i input.tiff -o output.jp2 -rate -,0.001 Clayers=28
> Clevels=8 Corder=PCRL ORGgen_plt=yes
>
> You should be able to open the generated `output.jp2` using kdu_show
> (windows) or kdu_macshow (MacOSX).
Thanks for your reply and helpful suggestions.
Using vips/openslide to convert my Mirax image to a tiff, I found that
only if I set `compresssion=none` that kakadu would even open the
file. The problem is that with compression=none, the resulting tif is
~50gb, and the jp2 that kdu_compress returns is several GBs in size
(about an order of magnitude smaller than the raw tif, though!),
making it larger than the original mirax image.
If I follow John's suggestion on the VIPS list and use lzw compression:
vips extract_band CMU-1.mrxs
x.tif[bigtiff,tile,compression=lzw,bigtiff] 0 --n 3
and try to convert x.tif using kdu_compress, I get a much more
manageable size of ~5GB, but upon attempting compression via
kdu_compress I get the message:
"
Kakadu Error:
The simple TIFF file reader in this demo application can only read
uncompressed
TIFF files. This has nothing to do with Kakadu itself, of course. If you
would like to read compressed TIFF files, however, it should be sufficient to
re-compile this application with the symbol "KDU_INCLUDE_TIFF" defined, and
link it against the public-domain LIBTIFF library.
"
I doubt there's a way to link LIBTIFF to kdu_compress since it is
already compiled, but do you know if there's some way to do it? I
would be very interested in enabling kdu_compress to read compressed
tiff files, after seeing the magnitude of file size reduction on an
UNcompressed tiff.
Thanks again for your thoughtful suggestions/ideas (Benjamin and
Mathieu); I appreciate it!
Ryan
More information about the openslide-users
mailing list