Skip to content

Commit

Permalink
Merge pull request #96 from snailsnap/quick_improvements
Browse files Browse the repository at this point in the history
Quick improvements
  • Loading branch information
lukaswagner authored Jun 21, 2018
2 parents 3f8ebf8 + 486ecdf commit 4a2e922
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ Muscheln und Schnecken des Museums für Naturkunde Berlin freistellen und neue B
|master | [![Build Status](https://travis-ci.com/snailsnap/mosaic.svg?branch=master)](https://travis-ci.com/snailsnap/mosaic) | [![Build status](https://ci.appveyor.com/api/projects/status/5g1x1yk1wvlohao2/branch/master?svg=true)](https://ci.appveyor.com/project/lukaswagner/mosaic/branch/master) |
|develop | [![Build Status](https://travis-ci.com/snailsnap/mosaic.svg?branch=develop)](https://travis-ci.com/snailsnap/mosaic) | [![Build status](https://ci.appveyor.com/api/projects/status/5g1x1yk1wvlohao2/branch/develop?svg=true)](https://ci.appveyor.com/project/lukaswagner/mosaic/branch/develop) |

## How to Run

- Install Qt
- Clone it
- Initialize submodules (if SmtpClient or JCVoronoi fail to build, you're missing this)
- Run CMake
- Build it
- Place the data folder (containing the snail images, the meta file and the optional descriptions) next to the built executable
- Run it
- If it doesn't work for some reason, check these steps again, and if it still doesn't work create an issue where you tell [Lukas](https://github.com/lukaswagner) to improve the readme.

## Command Line Arguments

- Important
- `-n` or `--maxNumOfMolluscs` - Number of snails to build the mosaic from. A good value is 7500.
- Optional
- `-d` or `--data` - Path to the data folder, if it's not placed directly next to the executable.
- `-c` or `--useCam` - Whether the camera should be used to capture images. Pass `false` to use a file dialog to open an existing image. Default is `true`.
- Unnecessary
- `-o` or `--output` - Output of the processed image. Just for debugging.

## Dependencies

- [Qt](https://www.qt.io/)
Expand Down
4 changes: 2 additions & 2 deletions src/mail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void MailClient::sendImage(const QString& recipient, const QImage& image)
auto text = new MimeText { m_message };
mail.addPart(text);

image.save("SnailSnap.png");
auto file = new QFile { "SnailSnap.png" };
image.save("SnailSnap.jpg");
auto file = new QFile { "SnailSnap.jpg" };
auto attachment = new MimeAttachment(file);

mail.addPart(attachment);
Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MainWindow : public QMainWindow {

private:
const int c_diaTime = 5000;
const int c_photoTime = 30000;
const int c_photoTime = 300000;

bool m_imageCaptureInProgress = false;
int m_countdown = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/mollusc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Mollusc::Mollusc(const std::string& data)
{
strings.push_back(string);
}
assert(strings.size() == 17 || strings.size() == 18);
assert(strings.size() > 16);

auto i = 0u;
m_imageName = strings[0];
Expand Down

0 comments on commit 4a2e922

Please sign in to comment.