From c2a830a4bb5f23791c4131132a4b7efbf7c918c0 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sat, 5 Jul 2008 22:02:25 +0200 Subject: fix tiff output path --- src/gipfel.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 9409673..0e57b6a 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -616,11 +617,11 @@ stitch(GipfelWidget::sample_mode_t m, int b_16, char buf[1024]; char *dot; - snprintf(buf, sizeof(buf), "%s/%s", path, argv[i]); + snprintf(buf, sizeof(buf), "%s/%s", path, basename(argv[i])); dot = strrchr(buf, '.'); - if (dot) { + if (dot) *dot = '\0'; - } + strncat(buf, ".tiff", sizeof(buf)); st->set_output(argv[i], new TIFFOutputImage(buf, b_16?16:8)); -- cgit v1.2.3