# include <unistd.h>
#endif
+#ifdef NEED_LIBPORT
+# include "libport.h"
+#endif
+
#include "tiffio.h"
#define streq(a,b) (strcmp(a,b) == 0)
* Get first line
*/
if (TIFFReadScanline(in, inputline, 0, 0) <= 0)
- return;
+ goto skip_on_error;
+
inptr = inputline;
nextptr = nextline;
for (j = 0; j < imagewidth; ++j)
if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
break;
}
+ skip_on_error:
_TIFFfree(inputline);
_TIFFfree(thisline);
_TIFFfree(nextline);
float floatv;
char thing[1024];
uint32 rowsperstrip = (uint32) -1;
- int onestrip = 0;
uint16 fillorder = 0;
int c;
extern int optind;
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
- onestrip = 0;
break;
case 't':
threshold = atoi(optarg);
CopyField(TIFFTAG_XRESOLUTION, floatv);
CopyField(TIFFTAG_YRESOLUTION, floatv);
CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
- if (onestrip)
- rowsperstrip = imagelength-1;
- else
- rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
+ rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
switch (compression) {
case COMPRESSION_CCITTFAX3:
}
/* vim: set ts=8 sts=8 sw=8 noet: */
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */