mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-06 15:47:39 +03:00
add headers
This commit is contained in:
parent
a7d9c181c8
commit
7cee115d43
@ -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";
|
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 {
|
bool Epub::generateThumbBmp(int width, int height) const {
|
||||||
// Already generated, return true
|
// Already generated, return true
|
||||||
if (SdMan.exists(getThumbBmpPath(width, height).c_str())) {
|
if (SdMan.exists(getThumbBmpPath(width, height).c_str())) {
|
||||||
|
|||||||
@ -49,6 +49,8 @@ class Epub {
|
|||||||
bool generateCoverBmp(bool cropped = false) const;
|
bool generateCoverBmp(bool cropped = false) const;
|
||||||
std::string getThumbBmpPath(int width, int height) const;
|
std::string getThumbBmpPath(int width, int height) const;
|
||||||
bool generateThumbBmp(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,
|
uint8_t* readItemContentsToBytes(const std::string& itemHref, size_t* size = nullptr,
|
||||||
bool trailingNullByte = false) const;
|
bool trailingNullByte = false) const;
|
||||||
bool readItemContentsToStream(const std::string& itemHref, Print& out, size_t chunkSize) const;
|
bool readItemContentsToStream(const std::string& itemHref, Print& out, size_t chunkSize) const;
|
||||||
|
|||||||
@ -63,6 +63,8 @@ class Xtc {
|
|||||||
std::string getCoverBmpPath() const;
|
std::string getCoverBmpPath() const;
|
||||||
bool generateCoverBmp() const;
|
bool generateCoverBmp() const;
|
||||||
// Thumbnail support (for Continue Reading card)
|
// Thumbnail support (for Continue Reading card)
|
||||||
|
std::string getThumbBmpPath() const;
|
||||||
|
bool generateThumbBmp() const;
|
||||||
std::string getThumbBmpPath(int width, int height) const;
|
std::string getThumbBmpPath(int width, int height) const;
|
||||||
bool generateThumbBmp(int width, int height) const;
|
bool generateThumbBmp(int width, int height) const;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user