From 06467c38d888864cd3f2ae461785d6e082c93f89 Mon Sep 17 00:00:00 2001 From: Alan De Smet Date: Fri, 22 Mar 2019 22:57:00 -0500 Subject: [PATCH] Center tall, skinny thumbnails in their space. --- src/main/cpp/tiv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cpp/tiv.cpp b/src/main/cpp/tiv.cpp index c967f7d..092e4b2 100644 --- a/src/main/cpp/tiv.cpp +++ b/src/main/cpp/tiv.cpp @@ -540,7 +540,7 @@ int main(int argc, char* argv[]) { sb += cut == std::string::npos ? name : name.substr(cut + 1); size newSize = fit_within(maxThumbSize, size(original)); original.resize(newSize.width, newSize.height, 1, -100, 5); - image.draw_image(count * (tw + 8), (tw - newSize.height) / 2, 0, 0, original); + image.draw_image(count * (tw + 8) + (tw - newSize.width) / 2, (tw - newSize.height) / 2, 0, 0, original); count++; unsigned int sl = count * (cw + 2); sb.resize(sl - 2, ' ');