Adiciona registro de formatos no core e tinyblocks-image (ops genericas + Load/Save)

This commit is contained in:
mguinhos committed 2026-10-20 21:08:18 -03:00
1 parent fca7aa2f63
commit f4e2556110
11 files changed
+479 -9

No files matched your search

+3 -1
View File
@@ -118,8 +118,10 @@ static bool png_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
static const TinyBlocks_SlotDesc load_in[] = {{"caminho", TB_VALUE_TEXT}};
static const TinyBlocks_SlotDesc save_in[] = {{"imagem", TB_VALUE_IMAGE}, {"caminho", TB_VALUE_TEXT}};
return reg(rt, lib, "PNG.Load", load_in, 1, out_img, 1, eval_load)
bool ok = reg(rt, lib, "PNG.Load", load_in, 1, out_img, 1, eval_load)
&& reg(rt, lib, "PNG.Save", save_in, 2, NULL, 0, eval_save);
if (ok) tb_image_register_format("png", tb_png_load, tb_png_save);
return ok;
}
TINYBLOCKS_DEFINE_LIBRARY(png, "tinyblocks-png", "1.0.0", png_init, NULL)