minor fixes on TIFF handling
This commit is contained in:
parent
301a0133e7
commit
3223caa03b
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user