minor fixes on TIFF handling

This commit is contained in:
2020-08-22 17:38:27 +02:00
parent 301a0133e7
commit 3223caa03b
2 changed files with 7 additions and 6 deletions

View File

@@ -43,8 +43,9 @@ if (verbosity) {
}
tiff = TIFFOpen(fname, "w");
printf("tiff at %p\n", tiff);
if (NULL==tiff) {
return -6;
}
TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, src->width);
TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, src->height);
@@ -60,7 +61,7 @@ TIFFSetField(tiff, TIFFTAG_SOFTWARE, ligne);
foo = src->width * 3;
foo = TIFFDefaultStripSize(tiff, foo);
fprintf(stderr, "default strip size %d\n", foo);
if (verbosity) fprintf(stderr, "default strip size %d\n", foo);
TIFFSetField(tiff, TIFFTAG_ROWSPERSTRIP, foo);