mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 18:06:16 +01:00
- use the actual color table in tagtype json for rendering images (until now, that color table was ignored) - added proper ordered dithering (works with all colors now, not just gray and pink) - on the static image content card, you can now choose floyd-steinberg or ordered dithering (or turn dithering off) - added ÅÄÖ to twcondensed20 font - small bugfixes - fix serial passthrough via UART in OEPL-flasher.py
46 lines
825 B
C
46 lines
825 B
C
#include <Arduino.h>
|
|
#include <TFT_eSPI.h>
|
|
|
|
#pragma once
|
|
|
|
#include "tag_db.h"
|
|
|
|
extern TFT_eSPI tft;
|
|
|
|
#define SHORTLUT_DISABLED 0
|
|
#define SHORTLUT_ONLY_BLACK 1
|
|
#define SHORTLUT_ALLOWED 2
|
|
|
|
struct imgParam {
|
|
HwType hwdata;
|
|
|
|
bool hasRed;
|
|
uint8_t dataType;
|
|
uint8_t dither;
|
|
// bool grayLut = false;
|
|
uint8_t bufferbpp = 8;
|
|
uint8_t rotate = 0;
|
|
uint16_t highlightColor = 2;
|
|
|
|
uint16_t width;
|
|
uint16_t height;
|
|
uint8_t rotatebuffer;
|
|
uint8_t bpp;
|
|
|
|
char segments[12];
|
|
uint16_t symbols;
|
|
uint8_t invert;
|
|
|
|
uint8_t lut;
|
|
uint8_t shortlut;
|
|
|
|
bool preload;
|
|
uint8_t preloadtype;
|
|
uint8_t preloadlut;
|
|
|
|
uint8_t zlib;
|
|
};
|
|
|
|
void spr2buffer(TFT_eSprite &spr, String &fileout, imgParam &imageParams);
|
|
void jpg2buffer(String filein, String fileout, imgParam &imageParams);
|