mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
22 lines
1.0 KiB
C++
22 lines
1.0 KiB
C++
#pragma once
|
|
|
|
class FsFile;
|
|
class Print;
|
|
class ZipFile;
|
|
|
|
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);
|
|
|
|
public:
|
|
static bool jpegFileToBmpStream(FsFile& jpegFile, Print& bmpOut);
|
|
// 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
|
|
static bool jpegFileTo1BitBmpStreamWithSize(FsFile& jpegFile, Print& bmpOut, int targetMaxWidth, int targetMaxHeight);
|
|
// Extract JPEG dimensions without loading full image
|
|
static bool getJpegDimensions(FsFile& jpegFile, int* width, int* height);
|
|
};
|