网页升级

This commit is contained in:
2026-08-11 06:21:51 +08:00
parent f50e9f7c1e
commit feb7c72e94
40 changed files with 6490 additions and 98 deletions
+15
View File
@@ -4,12 +4,27 @@
#include <cstddef>
#include <string>
#include <vector>
namespace renderive::web {
inline constexpr std::size_t pixel_frame_header_size = 16;
struct Pixel_Frame_Copy {
int width{};
int height{};
std::vector<Pixel> pixels;
[[nodiscard]] bool empty() const noexcept {
return width <= 0 || height <= 0 || pixels.empty();
}
};
[[nodiscard]] Pixel_Frame_Copy copy_pixel_frame(Image_View image);
[[nodiscard]] std::string encode_pixel_frame(Image_View image,
Color background = Color::black());
[[nodiscard]] std::string encode_pixel_frame(const Pixel_Frame_Copy& image,
Color background = Color::black());
} // namespace renderive::web