feat: add sdcpp api support (#1407)

This commit is contained in:
leejet authored and GitHub committed 2026-04-11 17:49:00 +08:00
1 parent 118489eb5c
commit 7ade90e478
17 files changed
+3237 -1308

No files matched your search

+4 -2
View File
@@ -569,6 +569,7 @@ void write_u32_le(FILE* f, uint32_t val) {
void write_u16_le(FILE* f, uint16_t val) {
fwrite(&val, 2, 1, f);
}
EncodedImageFormat encoded_image_format_from_path(const std::string& path) {
std::string ext = fs::path(path).extension().string();
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
@@ -682,8 +683,9 @@ bool load_sd_image_from_file(sd_image_t* image,
if (image->data == nullptr) {
return false;
}
image->width = width;
image->height = height;
image->width = width;
image->height = height;
image->channel = expected_channel;
return true;
}