From b9cb412c1ce8d412419eec337339c68a2ce5e1b5 Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Tue, 13 Jan 2026 11:38:22 +0100 Subject: [PATCH] Fixed name of cropped cover bmp, clarified comment. --- lib/Epub/Epub.cpp | 2 +- lib/GfxRenderer/GfxRenderer.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 64727bca..65cfd4b0 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -349,7 +349,7 @@ const std::string& Epub::getAuthor() const { } std::string Epub::getCoverBmpPath(bool cropped) const { - const auto coverFileName = "cover" + cropped ? "_crop" : ""; + const auto coverFileName = std::string("cover") + (cropped ? "_crop" : ""); return cachePath + "/" + coverFileName + ".bmp"; } diff --git a/lib/GfxRenderer/GfxRenderer.cpp b/lib/GfxRenderer/GfxRenderer.cpp index e94ea460..ebcbfe23 100644 --- a/lib/GfxRenderer/GfxRenderer.cpp +++ b/lib/GfxRenderer/GfxRenderer.cpp @@ -232,9 +232,10 @@ void GfxRenderer::drawBitmap(const Bitmap& bitmap, const int x, const int y, con drawVal(screenX, screenY, val); // draw extended pixels - /// amount of pixels taken from bitmap and repeated to extend + // amount of pixels taken from bitmap and repeated to extend. + // Trade-off between risk of repeating "edgy" content like text and more quality int extendY = 20; - int extendX = 20; // The width of the strip to be mirrored + int extendX = 20; int drawExtY = 0; if (extend) { int imgHeight = std::floor(scale * (bitmap.getHeight() - cropPixY));