| 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 |
Thread2010.12.23 13:59 "Re: [ANNOUNCE]: LZMA2 codec", by Andrey KiselevOn Thu, Dec 23, 2010 at 01:23:14PM +0100, Even Rouault wrote: > I've integrated successfully the LZMA codec in GDAL GeoTIFF driver, but I have > noticed one issue. I don't manage to control the size of the resulting file by > changing the value of the TIFFTAG_LZMAPRESET tag. My analysis showed that > LZMAVSetField() only calls lzma_lzma_preset() with the passed preset value if we > are in the LSTATE_INIT_ENCODE state. But this state is only set by > LZMASetupEncode(), which as far as I can see is called at the time of the first > TIFFWriteScanline(), TIFFWriteEncodedTile() or TIFFWriteEncodedStrip(). The GDAL > driver tries to set the preset value much more early, like what is done with the > TIFFTAG_ZIPQUALITY or TIFFTAG_JPEGQUALITY that control similar parameters for > LZW and JPEG compression. So the value is ignored. Do I miss something or > shouldn't the lzma_lzma_preset(&sp->opt_lzma, sp->preset); call be moved from > LZMAVSetField() to LZMAPreEncode() ? Even, I already catched the bug, please try the recent CVS. Thanks, Andrey -- Andrey V. Kiselev |
|||||||