Message-ID: 05033382C5460007*/c=fr/admd=atlas/prmd=edfgdf/o=notes/s=Marc/g=Raphael/@MHS
To: tiff <tiff@olympiakos.com>
Subject: Error "PackBitsDecode : not enough data for scanline ..."
From: Raphael MARC <Raphael.Marc@edf.fr>
Date: 12 Nov 1999 18:54:40 +0100
Sender: owner-tiff@olympiakos.com


Hello,

Using the TIFF library, when I read a small bilevel(a) TIFF image, the following messages are displayed in a dialog box 
(and my program doesn't read correctly the image) :
        PackBitsDecode : not enough data for scanline 0
        PackBitsDecode : not enough data for scanline 1
        etc.

(a) bitspersample=1, samplesperpixel=1

This happens only on small images : I'm testing my program on the same image which I'm rescaling. For instance, 
at the beginning, its size is 200(width)*100. When I'm scaling down this image, my program runs correctly untill 
width = 18. For width <=17, the error messages are displayed. And when I'm scaling up the image from 17 to 18, the
error messages are still displayed !

My code is like :

................
buf = (unsigned char* )_TIFFmalloc(sizeLine);
for (row = 0; row < lenght; row++) {
        if (TIFFReadScanline(tif, buf, row, 0))   /* the error happens there */
                {
                ....................
                }

Any help appreciated.

Raphaël

