Never return 0 from the TIFFNumberOfStrips().
This commit is contained in:
parent
29e9522c6f
commit
51cc3940e8
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_strip.c,v 1.3 2003-11-07 11:26:38 dron Exp $ */
|
||||
/* $Id: tif_strip.c,v 1.4 2004-04-30 08:34:44 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1997 Sam Leffler
|
||||
@ -62,8 +62,7 @@ TIFFNumberOfStrips(TIFF* tif)
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
tstrip_t nstrips;
|
||||
|
||||
nstrips = (td->td_rowsperstrip == (uint32) -1 ?
|
||||
(td->td_imagelength != 0 ? 1 : 0) :
|
||||
nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
|
||||
TIFFhowmany(td->td_imagelength, td->td_rowsperstrip));
|
||||
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
|
||||
nstrips *= td->td_samplesperpixel;
|
||||
|
Loading…
Reference in New Issue
Block a user