chatgui-android: съёмка фото — JPEG, выбор разрешения, отправка аттачем, просмотр с зумом

This commit is contained in:
evgeny committed 2026-09-08 20:02:40 +03:00
1 parent c94acd892e
commit ca16b46404
18 files changed
+890 -6

No files matched your search

+5
View File
@@ -155,6 +155,11 @@ static void on_media_registered(void* arg, int err, const struct media_index_res
off += snprintf(full_data + off, fdcap - off, "|dur=%lld|w=%d|h=%d",
(long long)mctx->duration_ms, mctx->width, mctx->height);
}
/* для фото дописываем разрешение в конец */
else if (mctx->content_type[0] && strncmp(mctx->content_type, "image/", 6) == 0
&& (mctx->width > 0 || mctx->height > 0)) {
off += snprintf(full_data + off, fdcap - off, "|w=%d|h=%d", mctx->width, mctx->height);
}
size_t full_data_len = off;
size_t json_cap = full_data_len + 256;