summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-11 10:50:44 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-11 10:50:44 +0200
commit62785647cd3e64069e30da77486e165508cdb012 (patch)
tree3c26083473322de293af9bac9db0f8cb170d79e2
parentc208620943239c5cdbe80c562bd5366ff4ffaab9 (diff)
downloaduca-62785647cd3e64069e30da77486e165508cdb012.tar.gz
uca-62785647cd3e64069e30da77486e165508cdb012.tar.bz2
uca-62785647cd3e64069e30da77486e165508cdb012.tar.xz
uca-62785647cd3e64069e30da77486e165508cdb012.zip
grab: drop --write-tiff and guess from file suffix
-rw-r--r--bin/tools/grab.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/bin/tools/grab.c b/bin/tools/grab.c
index f9958ae..a3e1839 100644
--- a/bin/tools/grab.c
+++ b/bin/tools/grab.c
@@ -229,7 +229,7 @@ record_frames (UcaCamera *camera, Options *opts)
g_print ("No filename given, not writing data.\n");
else {
#ifdef HAVE_LIBTIFF
- if (opts->write_tiff)
+ if (g_str_has_suffix (opts->filename, ".tif") || g_str_has_suffix (opts->filename, ".tiff"))
write_tiff (buffer, opts, roi_width, roi_height, bits);
else
write_raw (buffer, opts);
@@ -255,17 +255,11 @@ main (int argc, char *argv[])
static Options opts = {
.n_frames = -1,
.filename = NULL,
-#ifdef HAVE_LIBTIFF
- .write_tiff = FALSE,
-#endif
};
static GOptionEntry entries[] = {
{ "num-frames", 'n', 0, G_OPTION_ARG_INT, &opts.n_frames, "Number of frames to acquire", "N" },
{ "output", 'o', 0, G_OPTION_ARG_STRING, &opts.filename, "Output file name template", "FILE" },
-#ifdef HAVE_LIBTIFF
- { "write-tiff", 't', 0, G_OPTION_ARG_NONE, &opts.write_tiff, "Write as TIFF", NULL },
-#endif
{ NULL }
};