diff --git a/Launcher.cpp b/Launcher.cpp
index 082ae0b..9a566e1 100644
--- a/Launcher.cpp
+++ b/Launcher.cpp
@@ -115,6 +115,10 @@ int Launcher::automaticMerge() {
ImageIO io;
int result = 0;
for (LoadOptions & options : optionsSet) {
+ if (!options.withSingles && options.fileNames.size() == 1) {
+ Log::progress(tr("Skipping single image %1").arg(options.fileNames.front()));
+ continue;
+ }
CoutProgressIndicator progress;
int numImages = options.fileNames.size();
int result = io.load(options, progress);
@@ -168,6 +172,8 @@ void Launcher::parseCommandLine() {
generalOptions.crop = false;
} else if (string("--batch") == argv[i] || string("-B") == argv[i]) {
generalOptions.batch = true;
+ } else if (string("--single") == argv[i]) {
+ generalOptions.withSingles = true;
} else if (string("--help") == argv[i]) {
help = true;
} else if (string("-b") == argv[i]) {
@@ -240,6 +246,7 @@ void Launcher::showHelp() {
cout << " " << "-B|--batch " << tr("Batch mode: Input images are automatically grouped into bracketed sets,") << endl;
cout << " " << " " << tr("by comparing the creation time. Implies -a if no output file name is given.") << endl;
cout << " " << "-g gap " << tr("Batch gap, maximum difference in seconds between two images of the same set.") << endl;
+ cout << " " << "--single " << tr("Include single images in batch mode (the default is to skip them.)") << endl;
cout << " " << "-b BPS " << tr("Bits per sample, can be 16, 24 or 32.") << endl;
cout << " " << "--no-align " << tr("Do not auto-align source images.") << endl;
cout << " " << "--no-crop " << tr("Do not crop the output image to the optimum size.") << endl;
diff --git a/LoadSaveOptions.hpp b/LoadSaveOptions.hpp
index 4f9c79f..70badfd 100644
--- a/LoadSaveOptions.hpp
+++ b/LoadSaveOptions.hpp
@@ -34,7 +34,9 @@ struct LoadOptions {
bool crop;
bool batch;
double batchGap;
- LoadOptions() : align(true), crop(true), batch(false), batchGap(2.0) {}
+ bool withSingles;
+ LoadOptions() : align(true), crop(true), batch(false), batchGap(2.0),
+ withSingles(false) {}
};
diff --git a/hdrmerge_es.ts b/hdrmerge_es.ts
index 156b12f..f791821 100644
--- a/hdrmerge_es.ts
+++ b/hdrmerge_es.ts
@@ -135,6 +135,10 @@
Invalid %1 parameter, using default.
Parámetro %1 inválido, se usará el valor por defecto.
+
+ Include single images in batch mode (the default is to skip them.)
+ Incluir imágenes sueltas en modo lote (por defecto se ignoran).
+
LoadSave
@@ -182,6 +186,10 @@
Done writing!
¡Escritura finalizada!
+
+ Skipping single image %1
+ Ignorando la imagen suelta %1
+
hdrmerge::AboutDialog