diff --git a/funcs/fimg-tiff.c b/funcs/fimg-tiff.c index d00d0bf..bd66fdf 100644 --- a/funcs/fimg-tiff.c +++ b/funcs/fimg-tiff.c @@ -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); diff --git a/tools/fimg2tiff.c b/tools/fimg2tiff.c index b65c1ef..5589c51 100644 --- a/tools/fimg2tiff.c +++ b/tools/fimg2tiff.c @@ -46,7 +46,7 @@ if (grisaille) { foo = fimg_write_as_tiff(&fimg, dstname, 0); if (foo) { - fprintf(stderr, "%s: saving as png '%s' -> %d\n", __func__, + fprintf(stderr, "%s: saving as tiff '%s' -> %d\n", __func__, dstname, foo); return -1; } @@ -59,9 +59,9 @@ return 0; void help(int k) { -puts("usage:\n\tfimg2tiff [options] foo.fimg bar.png"); +puts("usage:\n\tfimg2tiff [options] foo.fimg bar.tiff"); puts("options:"); -puts("\t-g\tconvert to gray"); +// puts("\t-g\tconvert to gray"); puts("\t-v\tincrease verbosity"); if (verbosity) fimg_print_version(1);