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

@@ -0,0 +1,23 @@
/*
* TinyBlocks - tb_imglib.h
* Library tinyblocks-image: operacoes genericas sobre TinyBlocks_Image e
* carregamento/gravacao por extensao (via registro de formatos do core).
* Reune os formatos ppm/bmp/png/jpg (quando carregados) e serve de base para
* as libraries de alto nivel (svg, vg).
*/
#ifndef TINYBLOCKS_IMGLIB_H
#define TINYBLOCKS_IMGLIB_H
#include <tinyblocks/tinyblocks.h>
TB_API const TinyBlocks_LibraryDescriptor* tb_imglib_get_library(void);
/* -- API C --- */
TB_API TinyBlocks_Image* tb_imglib_fill (TinyBlocks_Image* img,
uint8_t r, uint8_t g, uint8_t b, uint8_t a);
TB_API TinyBlocks_Image* tb_imglib_crop (const TinyBlocks_Image* img,
int x, int y, int w, int h);
TB_API TinyBlocks_Image* tb_imglib_scale(const TinyBlocks_Image* img,
int w, int h, bool smooth);
#endif /* TINYBLOCKS_IMGLIB_H */