Files
ctrff-pub/include/ctrff/helper.hpp

16 lines
652 B
C++
Raw Normal View History

2025-05-04 13:32:07 +02:00
#pragma once
#include <ctrff/types.hpp>
#include <palladium>
2025-05-04 13:32:07 +02:00
namespace ctrff {
CTRFF_API void String2U16(ctrff::u16 *res, const std::string &src, size_t max);
CTRFF_API std::string U16toU8(ctrff::u16 *in, size_t max);
CTRFF_API void RGB565toRGBA(std::vector<ctrff::u8> &img, ctrff::u16 *icon,
2025-05-04 13:32:07 +02:00
const int &w, const int &h);
// Image can only be rgba8888
CTRFF_API void RGBA2RGB565(ctrff::u16 *out, const std::vector<ctrff::u8> &img,
2025-05-04 13:32:07 +02:00
const int &w, const int &h);
CTRFF_API std::vector<ctrff::u8> DownscaleImage(
const std::vector<ctrff::u8> &img, int w, int h, int scale);
2025-05-04 13:32:07 +02:00
} // namespace ctrff