Files
OpenEPaperLink/ESP32_AP-Flasher/include/makeimage.h
Nic Limper 30812dff49 color related improvements
- added "image" to json commands to insert a jpg image/icon from the flash partition
- added optional center/right alignment to "textbox" json command
- google calendar content: added optional colors, different color per calendarid
- improved ordered dithering, works also with unevenly spaced color tables. This is to be used with graphs etc., not suitable for photos (use floyd steinberg for photos)
- improved flyod steinberg dithering (fix some bugs)
- added preview rendering for 4bpp images
- log tab now scrolls to the top on entering
- added optional perceptual color table to tagtypes (for rendering previews, for example to display darker yellows on screen while keeping the 255,255,0 color to the tag
- drag/dropping in an image to a tag while holding shift key now uses ordered dithering (default is floyd steinberg)
- some tagtype improvements
2024-12-10 23:01:02 +01:00

46 lines
812 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;
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;
uint8_t g5;
};
void spr2buffer(TFT_eSprite &spr, String &fileout, imgParam &imageParams);
void jpg2buffer(String filein, String fileout, imgParam &imageParams);