From f626744aa7145c5f2ea406089636428607405f5f Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 12 Apr 2022 14:13:35 +0800 Subject: Bugfix: caption won't print if the image is too small. --- main_simple_scanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main_simple_scanner.cpp') 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 -- cgit v1.2.3