2023-08-01 20:17:38 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "./image_loader.hpp"
|
|
|
|
|
|
|
|
struct ImageLoaderSTB : public ImageLoaderI {
|
|
|
|
ImageInfo loadInfoFromMemory(const uint8_t* data, uint64_t data_size) override;
|
|
|
|
ImageResult loadFromMemoryRGBA(const uint8_t* data, uint64_t data_size) override;
|
|
|
|
};
|
|
|
|
|
2023-10-06 13:16:45 +02:00
|
|
|
struct ImageEncoderSTBPNG : public ImageEncoderI {
|
|
|
|
std::vector<uint8_t> encodeToMemoryRGBA(const ImageResult& input_image, const std::map<std::string, float>& extra_options = {}) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ImageEncoderSTBJpeg : public ImageEncoderI {
|
|
|
|
std::vector<uint8_t> encodeToMemoryRGBA(const ImageResult& input_image, const std::map<std::string, float>& extra_options = {}) override;
|
|
|
|
};
|
|
|
|
|