Skip to content

Commit

Permalink
changes/fixes - to be squashed
Browse files Browse the repository at this point in the history
  • Loading branch information
ff2000 committed Sep 25, 2019
1 parent 0c262a7 commit eaa1d94
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ list<LoadOptions> Launcher::getBracketedSets() {
list<LoadOptions> result;
if (generalOptions.imagesPerBracket > 0) {
if (generalOptions.fileNames.size() % generalOptions.imagesPerBracket != 0) {
throw std::logic_error("Number of files not a multiple of number per bracketed set (-i).");
cerr << QCoreApplication::translate("LoadSave", "Number of files not a multiple of number per bracketed set (-s). Aborting.");
exit(EXIT_FAILURE);
}

while(!generalOptions.fileNames.empty()) {
Expand Down Expand Up @@ -194,12 +195,12 @@ void Launcher::parseCommandLine() {
generalOptions.crop = false;
} else if (string("--batch") == argv[i] || string("-B") == argv[i]) {
generalOptions.batch = true;
} else if (string("-i") == argv[i]) {
if(++i < argc) {
} else if (string("-s") == argv[i]) {
if (++i < argc) {
try {
int value = stoi(argv[i]);
generalOptions.imagesPerBracket = value;
} catch(std::invalid_argument & e) {
} catch (std::invalid_argument & e) {
cerr << tr("Invalid %1 parameter, falling back to interval-based bracketing set creation.").arg(argv[i - 1]) << endl;
}
}
Expand Down Expand Up @@ -286,7 +287,7 @@ void Launcher::showHelp() {
cout << " " << "-a " << tr("Calculates the output file name as") << " %id[-1]/%iF[0]-%in[-1].dng." << endl;
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 << " " << "-i NUM_IMAGES " << tr("Fixed number of images per bracket set. use together with -B.") << endl;
cout << " " << "-s NUM_IMAGES " << tr("Fixed number of images per bracket set. Use together with -B.") << endl;
cout << " " << " " << tr("Creation time will be ignored.") << 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;
Expand Down

0 comments on commit eaa1d94

Please sign in to comment.