2025-12-21 17:15:17 +11:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-12-30 15:09:30 +10:00
|
|
|
class FsFile;
|
|
|
|
|
class Print;
|
2025-12-21 17:15:17 +11:00
|
|
|
class ZipFile;
|
|
|
|
|
|
|
|
|
|
class JpegToBmpConverter {
|
|
|
|
|
static unsigned char jpegReadCallback(unsigned char* pBuf, unsigned char buf_size,
|
|
|
|
|
unsigned char* pBytes_actually_read, void* pCallback_data);
|
2026-01-05 00:47:42 +09:00
|
|
|
static bool jpegFileToBmpStreamInternal(class FsFile& jpegFile, Print& bmpOut, int targetWidth, int targetHeight,
|
|
|
|
|
bool oneBit);
|
2025-12-21 17:15:17 +11:00
|
|
|
|
|
|
|
|
public:
|
2025-12-30 15:09:30 +10:00
|
|
|
static bool jpegFileToBmpStream(FsFile& jpegFile, Print& bmpOut);
|
2026-01-01 19:02:05 +09:00
|
|
|
// Convert with custom target size (for thumbnails)
|
|
|
|
|
static bool jpegFileToBmpStreamWithSize(FsFile& jpegFile, Print& bmpOut, int targetMaxWidth, int targetMaxHeight);
|
2026-01-05 00:47:42 +09:00
|
|
|
// Convert to 1-bit BMP (black and white only, no grays) for fast home screen rendering
|
|
|
|
|
static bool jpegFileTo1BitBmpStreamWithSize(FsFile& jpegFile, Print& bmpOut, int targetMaxWidth, int targetMaxHeight);
|
2025-12-21 17:15:17 +11:00
|
|
|
};
|