Создание изображения из текста и накладывание одного изображения на другое.

This commit is contained in:
Евгений Титаренко 2024-04-11 09:47:52 +03:00
parent 9af7778b77
commit 38655e9c1b
5 changed files with 69 additions and 27 deletions

View file

@ -3,6 +3,7 @@
#include <cstdint>
#include <string>
#include <fstream>
#include "psf.h"
const char PADDING_ZEROES[3] = {0, 0, 0};
@ -88,6 +89,8 @@ public:
void save(const std::string &);
BMPImage appendRight(BMPImage &);
BMPImage overlay(BMPImage &, uint32_t, uint32_t);
};
BMPImage readBMPImage(const std::string &filename);
@ -112,4 +115,7 @@ BMPImage downscale2x(BMPImage &);
BMPImage upscale1_5x(BMPImage &);
BMPImage textImg(const std::u16string &, Font *font, uint8_t scale = 1, Pixel background_color = Pixel{0, 0, 0},
Pixel font_color = Pixel{255, 255, 255});
uint8_t ui8_clamp(int value, uint8_t min = 0, uint8_t max = 255);