AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.07.17 11:22 "possible bug in JPEGDecode", by Aleksandar Zivkovic
2004.07.18 19:50 "Re: possible bug in JPEGDecode", by Andrey Kiselev

2004.07.17 11:22 "possible bug in JPEGDecode", by Aleksandar Zivkovic

I tried to use libtiff with scanline-oriented interface (as described in
document Using the TIFF Library).
It seems it doesn't work . In my wrapper I'm using TIFFReadScanline
function. 

It seems that the problem occures in JPEGDecode (OJPEGDecode) function.
TIFFjpeg_finish_decompress (TIFFojpeg_finish_decompress) is called even if a
strip (or tile) is not finished. I override this with a patch:


static int
OJPEGDecode(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
  { 
.................................
 /* AZ: Close down the decompressor if we've finished the strip or tile. */
 if (sp->cinfo.d.output_scanline >= sp->cinfo.d.output_height)     /* I
 think we must check this first */

ERRCHK(TIFFojpeg_finish_decompress(sp,&ret)); /* AZ */
    return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
        || ret;
................................................
}

, So have I found a bug, or maybe Im not using scanline interface properly?

Best Regards,
Alexandar
e-mail:
Aleksandar.Zivkovic@micronasnit.com