add stb image loader (avatar png support)

This commit is contained in:
2023-08-01 20:17:38 +02:00
parent d725ed8cd0
commit a144459e8d
5 changed files with 81 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "./tox_avatar_loader.hpp"
#include "./image_loader_sdl_bmp.hpp"
#include "./image_loader_stb.hpp"
#include <solanaceae/contact/components.hpp>
#include <solanaceae/tox_contacts/components.hpp>
@ -15,7 +16,7 @@
ToxAvatarLoader::ToxAvatarLoader(Contact3Registry& cr) : _cr(cr) {
_image_loaders.push_back(std::make_unique<ImageLoaderSDLBMP>());
//_image_loaders.push_back(std::make_unique<ImageLoaderWebP>());
//_image_loaders.push_back(std::make_unique<ImageLoaderSTB>());
_image_loaders.push_back(std::make_unique<ImageLoaderSTB>());
}
static float getHue_6bytes(const uint8_t* data) {