| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2007.07.05 12:03 "Re: 16-Bit-Per-Channel Lossless Compression", by Andy CaveHi Stephen, I can easily do much better than that - 60:48. I can get ~21276876 (~20M) and with some more work I think I can get down to 15-20M. That's over a 3:1 and up to a 4:1. The problem with images like this is that most 8 bit lossless compression algorithms work badly across stripes, LZW in particular. In my experience (agreeing with Andrey here), Flate always does better, but takes a long time to do better - it has to because it has to do a lot of work to get something better. However, the solution is simple. Change the format of your files from striped to tiled. Doing that with some s/w of mine and using LZW I get ~20M (from ~60M) - a 3:1 compression ratio (using 256x256 or something like that). Use flate instead and I think you'll get somewhere between 15-20M. Seperate out the components - that is use RRRGGGBBB not RGB data - and I think you'll get even more (compression). Seperate out the top 8 bits from the bottom 8 bits (or possibly better still the top 12 bits from the bottom 4 bits - storing the 12 bits in 16 bit containers and packing the 4 bits) and I think you might get even more. Andrey - since you have tiffcp built, can you repeat your test, but produce tiled output? LZW and Flate. I think you'll find you get what I predict above - 15-20M. So, the solution is 'simple' - all the camera people need to switch to producing compressed tiled TIFF files. Either LZW or Flate. I think you'll find that Flate vs LZW does not slow down quite so much for tiles vs stripes (since it doesn't have to work quite so hard and the various chains / tables it stores don't get quite so big). I think that Tiled TIFF files are ignored too often by too many people. Regards, Andy. ----- Original Message ----- From: "Andrey Kiselev" <dron@ak4719.spb.edu> To: <tiff@lists.maptools.org> Sent: Thursday, July 05, 2007 11:56 AM Subject: Re: [Tiff] 16-Bit-Per-Channel Lossless Compression > On Wed, Jul 04, 2007 at 10:49:58AM -0700, Stephen Carlsen wrote: >> I can post some sample files if you like. On one of my images from my >> Canon XTi, exported from DNG to uncompressed TIFF (using Lightroom), >> the uncompressed size is 57.7 MB, but is 68.8 MB with LZW (plus >> predictor) compression. >> >> Flate tended to generally do worse than LZW, and be a lot slower, in >> my testing. > > That is strange, because I am usually have good results with Defalate. > For your file I have: > > $ tiffcp -c zip:2 -r 2592 IMG_2948.Flowers1.tif IMG_2948.Flowers1-zip2.tif > $ ls -l IMG_2948.Flowers1* > -rw-r--r-- 1 dron dron 60483984 2007-07-04 22:31 IMG_2948.Flowers1.tif > -rw-r--r-- 1 dron dron 48096986 2007-07-05 14:38 > IMG_2948.Flowers1-zip2.tif > > So we got 25% here, that is quite good result I think. > > Best regards, > Andrey > > -- > Andrey V. Kiselev > ICQ# 26871517 > _______________________________________________ > Tiff mailing list: Tiff@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/tiff > http://www.remotesensing.org/libtiff/ |
|||||||