fix: #348 fit cover artifacts 2 (#465)

Supersedes #358 and includes the bugfix from #351
This commit is contained in:
Jonas Diemer
2026-01-27 20:21:15 +11:00
committed by GitHub
parent 796a8e1d1e
commit 1a6b80c518
4 changed files with 15 additions and 10 deletions
+2 -2
View File
@@ -8,10 +8,10 @@ class JpegToBmpConverter {
static unsigned char jpegReadCallback(unsigned char* pBuf, unsigned char buf_size,
unsigned char* pBytes_actually_read, void* pCallback_data);
static bool jpegFileToBmpStreamInternal(class FsFile& jpegFile, Print& bmpOut, int targetWidth, int targetHeight,
bool oneBit);
bool oneBit, bool crop = true);
public:
static bool jpegFileToBmpStream(FsFile& jpegFile, Print& bmpOut);
static bool jpegFileToBmpStream(FsFile& jpegFile, Print& bmpOut, bool crop = true);
// Convert with custom target size (for thumbnails)
static bool jpegFileToBmpStreamWithSize(FsFile& jpegFile, Print& bmpOut, int targetMaxWidth, int targetMaxHeight);
// Convert to 1-bit BMP (black and white only, no grays) for fast home screen rendering