mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 15:17:37 +03:00
- Add 1-bit BMP generation with Atkinson dithering for better quality thumbnails - Replace noise dithering with error diffusion for smoother gradients - Add fillPolygon() to GfxRenderer for proper bookmark ribbon shape - Change bookmark from rect+triangle carve to pentagon polygon - Fix bookmark inversion when Continue Reading card is selected - Show selection state on first render (not just after navigation) - Fix 1-bit BMP palette lookup in Bitmap::readRow() - Add drawBitmap1Bit() optimized path for 1-bit BMPs The 1-bit format eliminates gray passes on home screen for faster rendering while Atkinson dithering maintains good image quality through error diffusion.
20 lines
904 B
C++
20 lines
904 B
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);
|
|
};
|