## Summary - Add basic JPG image support - Map JPG back to 2-bit BMP output - Can be used to later render the BMP file from disk or directly pass to output if wanted - Give the 3 passes over the data needed to render grayscale content, putting it on disk is preferred to outputting it multiple times ## Additional Context - WIP, looking forward to BMP support from https://github.com/daveallie/crosspoint-reader/pull/16 - Addresses some of #11
16 lines
459 B
C++
16 lines
459 B
C++
#pragma once
|
|
|
|
#include <FS.h>
|
|
|
|
class ZipFile;
|
|
|
|
class JpegToBmpConverter {
|
|
static void writeBmpHeader(Print& bmpOut, int width, int height);
|
|
static uint8_t grayscaleTo2Bit(uint8_t grayscale);
|
|
static unsigned char jpegReadCallback(unsigned char* pBuf, unsigned char buf_size,
|
|
unsigned char* pBytes_actually_read, void* pCallback_data);
|
|
|
|
public:
|
|
static bool jpegFileToBmpStream(File& jpegFile, Print& bmpOut);
|
|
};
|