openslide-users Digest, Vol 64, Issue 2
mathieu.malaterre at gmail.com
Thu May 7 06:12:36 EDT 2015
On Thu, May 7, 2015 at 11:47 AM, Ryan Murray <ryan.z.murray at helsinki.fi> wrote:
> 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.
That's what I described earlier. Even using a lossy representation
(kernel 9x7) it is hard to match the DCT degraded JPEG representation.
This is completely off-topic but you need to play wwith `-rate`
command line option if you are ok to loose some information (in
particular the `-` symbol). You may want to join the kakadu mailing
list for advanced control of lossy compression.
> 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.
No, the pre-compiled executables only handle a limited subset of the
TIFF specification. You'll need to buy a license (academic ones are
pretty cheap) and recompile kakadu yourself.
More information about the openslide-users