Система фильтрации

This commit is contained in:
Евгений Титаренко 2024-04-11 19:33:22 +03:00
parent 38655e9c1b
commit 24e2cbb354
3 changed files with 232 additions and 34 deletions

View file

@ -105,6 +105,8 @@ Pixel operator-(const Pixel &, const uint8_t &);
Pixel operator-(const uint8_t &, const Pixel &);
Pixel operator-(const Pixel &, const Pixel &);
BMPImage grayscale(BMPImage &);
BMPImage invertColors(BMPImage &);
@ -115,7 +117,13 @@ BMPImage downscale2x(BMPImage &);
BMPImage upscale1_5x(BMPImage &);
BMPImage upscale1_5x_ver2(BMPImage &); // TODO: BAD
BMPImage upscale2x_ver2(BMPImage &); // TODO: BAD
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);
uint8_t ui8_clamp(int value, uint8_t min = 0, uint8_t max = 255);
BMPImage filter(BMPImage &img, int mask[9], uint8_t modifier = 9);