From 6454db007e01f1486e3f2d9f4a7bb29a2cb74cbc Mon Sep 17 00:00:00 2001 From: Eliz Kilic Date: Sat, 24 Jan 2026 01:24:57 +0000 Subject: [PATCH] update image path --- lib/Epub/Epub.cpp | 6 +++++- lib/Xtc/Xtc.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 11ddf0bf..351d1b04 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -419,7 +419,11 @@ bool Epub::generateCoverBmp(bool cropped) const { return false; } -std::string Epub::getThumbBmpPath() const { return cachePath + "/thumb.bmp"; } +std::string Epub::getThumbBmpPath() const { + constexpr int THUMB_TARGET_WIDTH = 240; + constexpr int THUMB_TARGET_HEIGHT = 400; + return getThumbBmpPath(THUMB_TARGET_WIDTH, THUMB_TARGET_HEIGHT); +} std::string Epub::getThumbBmpPath(int width, int height) const { return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp"; diff --git a/lib/Xtc/Xtc.cpp b/lib/Xtc/Xtc.cpp index 866d31bc..b63346a1 100644 --- a/lib/Xtc/Xtc.cpp +++ b/lib/Xtc/Xtc.cpp @@ -293,7 +293,11 @@ bool Xtc::generateCoverBmp() const { return true; } -std::string Xtc::getThumbBmpPath() const { return cachePath + "/thumb.bmp"; } +std::string Xtc::getThumbBmpPath() const { + constexpr int THUMB_TARGET_WIDTH = 240; + constexpr int THUMB_TARGET_HEIGHT = 400; + return getThumbBmpPath(THUMB_TARGET_WIDTH, THUMB_TARGET_HEIGHT); +} std::string Xtc::getThumbBmpPath(int width, int height) const { return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp";