This commit is contained in:
Eliz Kilic 2026-01-24 00:17:48 +00:00
parent 423fc12718
commit a7d9c181c8
2 changed files with 5 additions and 2 deletions

View File

@ -419,6 +419,8 @@ bool Epub::generateCoverBmp(bool cropped) const {
return false; return false;
} }
std::string Epub::getThumbBmpPath() const { return cachePath + "/thumb.bmp"; }
std::string Epub::getThumbBmpPath(int width, int height) const { std::string Epub::getThumbBmpPath(int width, int height) const {
return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp"; return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp";
} }
@ -463,8 +465,7 @@ bool Epub::generateThumbBmp(int width, int height) const {
} }
// Use smaller target size for Continue Reading card (half of screen: 240x400) // Use smaller target size for Continue Reading card (half of screen: 240x400)
// Generate 1-bit BMP for fast home screen rendering (no gray passes needed) // Generate 1-bit BMP for fast home screen rendering (no gray passes needed)
const bool success = JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, thumbBmp, width, const bool success = JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, thumbBmp, width, height);
height);
coverJpg.close(); coverJpg.close();
thumbBmp.close(); thumbBmp.close();
SdMan.remove(coverJpgTempPath.c_str()); SdMan.remove(coverJpgTempPath.c_str());

View File

@ -293,6 +293,8 @@ bool Xtc::generateCoverBmp() const {
return true; return true;
} }
std::string Xtc::getThumbBmpPath() const { return cachePath + "/thumb.bmp"; }
std::string Xtc::getThumbBmpPath(int width, int height) const { std::string Xtc::getThumbBmpPath(int width, int height) const {
return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp"; return cachePath + "/thumb_" + std::to_string(width) + "x" + std::to_string(height) + ".bmp";
} }