| 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 |
Thread2004.07.18 19:50 "Re: possible bug in JPEGDecode", by Andrey KiselevOn Sat, Jul 17, 2004 at 01:22:16PM +0200, Aleksandar Zivkovic wrote:
> 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?
Both cases are possible. Could you show the code snippet you are using
for scanline reading?
Andrey
--
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517
|
|||||||