Move options for dithering and brightness to run time, fix BMP.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <SdFat.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class BmpReaderError : uint8_t {
|
||||
Ok = 0,
|
||||
FileInvalid,
|
||||
@@ -28,7 +30,8 @@ class Bitmap {
|
||||
public:
|
||||
static const char* errorToString(BmpReaderError err);
|
||||
|
||||
explicit Bitmap(FsFile& file) : file(file) {}
|
||||
explicit Bitmap(FsFile& file, bool useFloydSteinberg = false, uint8_t brightnessBoost = 0)
|
||||
: file(file), useFloydSteinberg(useFloydSteinberg), brightnessBoost(brightnessBoost) {}
|
||||
~Bitmap();
|
||||
BmpReaderError parseHeaders();
|
||||
BmpReaderError readNextRow(uint8_t* data, uint8_t* rowBuffer) const;
|
||||
@@ -44,6 +47,8 @@ class Bitmap {
|
||||
static uint32_t readLE32(FsFile& f);
|
||||
|
||||
FsFile& file;
|
||||
bool useFloydSteinberg = false;
|
||||
uint8_t brightnessBoost = 0;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
bool topDown = false;
|
||||
|
||||
Reference in New Issue
Block a user