summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-12 14:13:35 +0800
committerKeuin <[email protected]>2022-04-12 14:13:35 +0800
commitf626744aa7145c5f2ea406089636428607405f5f (patch)
treed84c324fc85ed7edc56e8cb215a6f46fe9e3ed3f
parentbb1ce1b496822fa4f97d57f607ec0b98a32182cd (diff)
Bugfix: caption won't print if the image is too small.
-rw-r--r--main_simple_scanner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp
index 60f514a..2cbe08b 100644
--- a/main_simple_scanner.cpp
+++ b/main_simple_scanner.cpp
@@ -207,5 +207,5 @@ int main(int argc, char **argv) {
generate_image(image_width, std::stoul(ih),
std::stod(vw), std::stod(fl),
std::stod(sz), std::stod(sr), cap,
- (int)(1.0 * image_width * 0.015 / 8));
+ std::max((int)(1.0 * image_width * 0.015 / 8), 1));
} \ No newline at end of file