From 7cee115d433321c01dac7f7d43fbfa56e716f1db Mon Sep 17 00:00:00 2001 From: Eliz Kilic Date: Sat, 24 Jan 2026 00:24:19 +0000 Subject: [PATCH] add headers --- lib/Epub/Epub.cpp | 6 ++++++ lib/Epub/Epub.h | 2 ++ lib/Xtc/Xtc.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index bd797dc2..9542745a 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -425,6 +425,12 @@ std::string Epub::getThumbBmpPath(int width, int height) const { return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp"; } +bool Epub::generateThumbBmp() const { + constexpr int THUMB_TARGET_WIDTH = 240; + constexpr int THUMB_TARGET_HEIGHT = 400; + return generateThumbBmp(THUMB_TARGET_WIDTH, THUMB_TARGET_HEIGHT); +} + bool Epub::generateThumbBmp(int width, int height) const { // Already generated, return true if (SdMan.exists(getThumbBmpPath(width, height).c_str())) { diff --git a/lib/Epub/Epub.h b/lib/Epub/Epub.h index be3d0ec7..ee708320 100644 --- a/lib/Epub/Epub.h +++ b/lib/Epub/Epub.h @@ -49,6 +49,8 @@ class Epub { bool generateCoverBmp(bool cropped = false) const; std::string getThumbBmpPath(int width, int height) const; bool generateThumbBmp(int width, int height) const; + std::string getThumbBmpPath() const; + bool generateThumbBmp() const; uint8_t* readItemContentsToBytes(const std::string& itemHref, size_t* size = nullptr, bool trailingNullByte = false) const; bool readItemContentsToStream(const std::string& itemHref, Print& out, size_t chunkSize) const; diff --git a/lib/Xtc/Xtc.h b/lib/Xtc/Xtc.h index 75054528..3d5cc6df 100644 --- a/lib/Xtc/Xtc.h +++ b/lib/Xtc/Xtc.h @@ -63,6 +63,8 @@ class Xtc { std::string getCoverBmpPath() const; bool generateCoverBmp() const; // Thumbnail support (for Continue Reading card) + std::string getThumbBmpPath() const; + bool generateThumbBmp() const; std::string getThumbBmpPath(int width, int height) const; bool generateThumbBmp(int width, int height) const;