Adiciona tinyblocks-bmp e tinyblocks-png (libpng)
This commit is contained in:
1 parent
959a4027c3
commit
fca7aa2f63
11 files changed
+574
-6
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# Makefile da library bmp (categoria "BMP")
|
||||
CC := gcc
|
||||
BUILD := build
|
||||
|
||||
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
||||
-D_POSIX_C_SOURCE=200809L -I../../include -Iinclude
|
||||
|
||||
OBJ := $(BUILD)/tb_bmp.o
|
||||
LIB_A := $(BUILD)/libtinyblocks-bmp.a
|
||||
LIB_SO := $(BUILD)/libtinyblocks-bmp.so
|
||||
|
||||
.PHONY: all static shared clean
|
||||
all: static shared
|
||||
static: $(LIB_A)
|
||||
shared: $(LIB_SO)
|
||||
|
||||
$(OBJ): src/tb_bmp.c include/tb_bmp.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
$(LIB_A): $(OBJ)
|
||||
ar rcs $@ $^
|
||||
|
||||
$(LIB_SO): $(OBJ)
|
||||
$(CC) -shared -o $@ $^
|
||||
|
||||
clean:
|
||||
$(RM) -r $(BUILD)
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* TinyBlocks - tb_bmp.h
|
||||
* Library tinyblocks-bmp: carrega/grava bitmap BMP (BITMAPINFOHEADER, BI_RGB)
|
||||
* de 24 e 32 bits como TinyBlocks_Image (TB_VALUE_IMAGE).
|
||||
*/
|
||||
#ifndef TINYBLOCKS_BMP_H
|
||||
#define TINYBLOCKS_BMP_H
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
TB_API const TinyBlocks_LibraryDescriptor* tb_bmp_get_library(void);
|
||||
|
||||
TB_API TinyBlocks_Image* tb_bmp_load(const char* path);
|
||||
TB_API bool tb_bmp_save(const TinyBlocks_Image* img, const char* path);
|
||||
TB_API const char* tb_bmp_last_error(void);
|
||||
|
||||
#endif /* TINYBLOCKS_BMP_H */
|
||||
@@ -0,0 +1,15 @@
|
||||
# Metadados da library bmp. Lido pela UI/build sem recompilar o .so.
|
||||
[library]
|
||||
name = "tinyblocks-bmp"
|
||||
version = "1.0.0"
|
||||
category = "BMP"
|
||||
description = "Imagens BMP: carregar e gravar (24/32 bits)"
|
||||
color = [126, 87, 194, 255]
|
||||
dark = [81, 45, 168, 255]
|
||||
|
||||
[build]
|
||||
sources = ["src/tb_bmp.c"]
|
||||
includes = ["include"]
|
||||
shared = "build/libtinyblocks-bmp.so"
|
||||
static = "build/libtinyblocks-bmp.a"
|
||||
depends = []
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* TinyBlocks - tb_bmp.c
|
||||
* Categoria "BMP": BMP.Load / BMP.Save. Le e grava BMP BI_RGB 24/32 bits.
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
#include "tb_bmp.h"
|
||||
|
||||
static char s_err[200] = "";
|
||||
const char* tb_bmp_last_error(void) { return s_err; }
|
||||
|
||||
static uint16_t rd16(const uint8_t* p) { return (uint16_t)(p[0] | (p[1] << 8)); }
|
||||
static uint32_t rd32(const uint8_t* p) {
|
||||
return (uint32_t)p[0] | ((uint32_t)p[1] << 8) | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24);
|
||||
}
|
||||
static void wr16(FILE* f, uint16_t v) { fputc(v & 0xff, f); fputc((v >> 8) & 0xff, f); }
|
||||
static void wr32(FILE* f, uint32_t v) {
|
||||
fputc(v & 0xff, f); fputc((v >> 8) & 0xff, f);
|
||||
fputc((v >> 16) & 0xff, f); fputc((v >> 24) & 0xff, f);
|
||||
}
|
||||
|
||||
TinyBlocks_Image* tb_bmp_load(const char* path) {
|
||||
s_err[0] = 0;
|
||||
if (!path) { snprintf(s_err, sizeof(s_err), "caminho nulo"); return NULL; }
|
||||
FILE* f = fopen(path, "rb");
|
||||
if (!f) { snprintf(s_err, sizeof(s_err), "nao abriu '%s'", path); return NULL; }
|
||||
uint8_t hdr[54];
|
||||
if (fread(hdr, 1, 54, f) != 54 || hdr[0] != 'B' || hdr[1] != 'M') {
|
||||
snprintf(s_err, sizeof(s_err), "nao e um BMP");
|
||||
fclose(f); return NULL;
|
||||
}
|
||||
uint32_t data_off = rd32(hdr + 10);
|
||||
uint32_t dib_size = rd32(hdr + 14);
|
||||
int32_t w = (int32_t)rd32(hdr + 18);
|
||||
int32_t h = (int32_t)rd32(hdr + 22);
|
||||
uint16_t bpp = rd16(hdr + 28);
|
||||
uint32_t comp = rd32(hdr + 30);
|
||||
|
||||
if (dib_size < 40 || w <= 0 || h == 0) {
|
||||
snprintf(s_err, sizeof(s_err), "cabecalho BMP nao suportado");
|
||||
fclose(f); return NULL;
|
||||
}
|
||||
if (bpp != 24 && bpp != 32) {
|
||||
snprintf(s_err, sizeof(s_err), "somente BMP 24/32 bits (bpp=%u)", bpp);
|
||||
fclose(f); return NULL;
|
||||
}
|
||||
if (comp != 0 && !(comp == 3 && bpp == 32)) {
|
||||
snprintf(s_err, sizeof(s_err), "compressao BMP nao suportada (%u)", comp);
|
||||
fclose(f); return NULL;
|
||||
}
|
||||
int topdown = h < 0;
|
||||
int ih = topdown ? -h : h;
|
||||
TinyBlocks_Image* img = tb_image_new(w, ih, 4);
|
||||
if (!img) { snprintf(s_err, sizeof(s_err), "sem memoria"); fclose(f); return NULL; }
|
||||
|
||||
size_t stride = ((size_t)w * bpp / 8 + 3) / 4 * 4;
|
||||
uint8_t* row = (uint8_t*)malloc(stride);
|
||||
if (!row) { tb_image_release(img); snprintf(s_err, sizeof(s_err), "sem memoria"); fclose(f); return NULL; }
|
||||
fseek(f, (long)data_off, SEEK_SET);
|
||||
for (int y = 0; y < ih; y++) {
|
||||
if (fread(row, 1, stride, f) != stride) {
|
||||
snprintf(s_err, sizeof(s_err), "dados truncados");
|
||||
free(row); tb_image_release(img); fclose(f); return NULL;
|
||||
}
|
||||
int dy = topdown ? y : (ih - 1 - y);
|
||||
for (int x = 0; x < w; x++) {
|
||||
const uint8_t* p = row + (size_t)x * (bpp / 8);
|
||||
uint8_t a = (bpp == 32) ? p[3] : 255;
|
||||
tb_image_set_pixel(img, x, dy, p[2], p[1], p[0], a);
|
||||
}
|
||||
}
|
||||
free(row);
|
||||
fclose(f);
|
||||
return img;
|
||||
}
|
||||
|
||||
bool tb_bmp_save(const TinyBlocks_Image* img, const char* path) {
|
||||
s_err[0] = 0;
|
||||
if (!img || !path) { snprintf(s_err, sizeof(s_err), "imagem/caminho nulo"); return false; }
|
||||
int w = tb_image_width(img), h = tb_image_height(img);
|
||||
if (w <= 0 || h <= 0) { snprintf(s_err, sizeof(s_err), "imagem vazia"); return false; }
|
||||
size_t stride = ((size_t)w * 3 + 3) / 4 * 4;
|
||||
uint32_t data_size = (uint32_t)(stride * (size_t)h);
|
||||
FILE* f = fopen(path, "wb");
|
||||
if (!f) { snprintf(s_err, sizeof(s_err), "nao criou '%s'", path); return false; }
|
||||
|
||||
/* FILEHEADER (14) */
|
||||
fputc('B', f); fputc('M', f);
|
||||
wr32(f, 14 + 40 + data_size);
|
||||
wr16(f, 0); wr16(f, 0);
|
||||
wr32(f, 14 + 40);
|
||||
/* BITMAPINFOHEADER (40) */
|
||||
wr32(f, 40);
|
||||
wr32(f, (uint32_t)w);
|
||||
wr32(f, (uint32_t)h);
|
||||
wr16(f, 1);
|
||||
wr16(f, 24);
|
||||
wr32(f, 0); /* BI_RGB */
|
||||
wr32(f, data_size);
|
||||
wr32(f, 2835); wr32(f, 2835);
|
||||
wr32(f, 0); wr32(f, 0);
|
||||
|
||||
uint8_t pad[3] = {0, 0, 0};
|
||||
for (int y = h - 1; y >= 0; y--) { /* BMP e' bottom-up */
|
||||
for (int x = 0; x < w; x++) {
|
||||
uint8_t r, g, b, a;
|
||||
tb_image_get_pixel(img, x, y, &r, &g, &b, &a);
|
||||
fputc(b, f); fputc(g, f); fputc(r, f);
|
||||
}
|
||||
size_t wrote = (size_t)w * 3;
|
||||
if (wrote < stride) fwrite(pad, 1, stride - wrote, f);
|
||||
}
|
||||
bool ok = (ferror(f) == 0);
|
||||
fclose(f);
|
||||
if (!ok) snprintf(s_err, sizeof(s_err), "erro ao gravar");
|
||||
return ok;
|
||||
}
|
||||
|
||||
/* -- Blocos -------------------------------------------------------------- */
|
||||
|
||||
static const char* in_text(TinyBlocks_Block* self, TinyBlocks* rt, uint32_t i) {
|
||||
TinyBlocks_Value v = tb_block_get_input(self, rt, i);
|
||||
return (v.kind == TB_VALUE_TEXT && v.as.text) ? v.as.text : "";
|
||||
}
|
||||
static TinyBlocks_Image* in_img(TinyBlocks_Block* self, TinyBlocks* rt, uint32_t i) {
|
||||
TinyBlocks_Value v = tb_block_get_input(self, rt, i);
|
||||
return v.kind == TB_VALUE_IMAGE ? v.as.image : NULL;
|
||||
}
|
||||
|
||||
static void eval_load(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
TinyBlocks_Image* img = tb_bmp_load(in_text(self, rt, 0));
|
||||
if (!img) { tinyblocks_set_error(rt, "%s", tb_bmp_last_error()); self->dirty = false; return; }
|
||||
tb_block_set_output(self, 0, tb_value_image(img));
|
||||
tb_image_release(img);
|
||||
self->dirty = false;
|
||||
}
|
||||
|
||||
static void eval_save(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
TinyBlocks_Image* img = in_img(self, rt, 0);
|
||||
if (!img || !tb_bmp_save(img, in_text(self, rt, 1)))
|
||||
tinyblocks_set_error(rt, "%s", tb_bmp_last_error());
|
||||
self->dirty = false;
|
||||
}
|
||||
|
||||
static bool reg(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib, const char* name,
|
||||
const TinyBlocks_SlotDesc* in, uint32_t ni,
|
||||
const TinyBlocks_SlotDesc* out, uint32_t no,
|
||||
void (*fn)(TinyBlocks_Block*, TinyBlocks*)) {
|
||||
TinyBlocks_TypeBlock* t = tb_type_block_create(rt, name, in, ni, out, no, fn);
|
||||
return t && tb_library_add(lib, &t->base);
|
||||
}
|
||||
|
||||
static bool bmp_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
|
||||
static const TinyBlocks_Category cat = {
|
||||
"BMP",
|
||||
{ 126/255.f, 87/255.f, 194/255.f, 1.f},
|
||||
{ 81/255.f, 45/255.f, 168/255.f, 1.f},
|
||||
};
|
||||
tb_library_set_category(lib, &cat);
|
||||
|
||||
static const TinyBlocks_SlotDesc out_img[] = {{"imagem", TB_VALUE_IMAGE}};
|
||||
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, "BMP.Load", load_in, 1, out_img, 1, eval_load)
|
||||
&& reg(rt, lib, "BMP.Save", save_in, 2, NULL, 0, eval_save);
|
||||
}
|
||||
|
||||
TINYBLOCKS_DEFINE_LIBRARY(bmp, "tinyblocks-bmp", "1.0.0", bmp_init, NULL)
|
||||
|
||||
const TinyBlocks_LibraryDescriptor* tb_bmp_get_library(void) {
|
||||
return &_tb_lib_desc_bmp;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# Makefile da library png (categoria "PNG"); depende de libpng.
|
||||
CC := gcc
|
||||
BUILD := build
|
||||
|
||||
PNG_CFLAGS := $(shell pkg-config --cflags libpng 2>/dev/null)
|
||||
PNG_LIBS := $(shell pkg-config --libs libpng 2>/dev/null)
|
||||
|
||||
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
||||
-D_POSIX_C_SOURCE=200809L -I../../include -Iinclude $(PNG_CFLAGS)
|
||||
|
||||
OBJ := $(BUILD)/tb_png.o
|
||||
LIB_A := $(BUILD)/libtinyblocks-png.a
|
||||
LIB_SO := $(BUILD)/libtinyblocks-png.so
|
||||
|
||||
.PHONY: all static shared clean
|
||||
all: static shared
|
||||
static: $(LIB_A)
|
||||
shared: $(LIB_SO)
|
||||
|
||||
$(OBJ): src/tb_png.c include/tb_png.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
$(LIB_A): $(OBJ)
|
||||
ar rcs $@ $^
|
||||
|
||||
$(LIB_SO): $(OBJ)
|
||||
$(CC) -shared -o $@ $^ $(PNG_LIBS)
|
||||
|
||||
clean:
|
||||
$(RM) -r $(BUILD)
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* TinyBlocks - tb_png.h
|
||||
* Library tinyblocks-png: carrega/grava PNG (dependencia de terceiros: libpng)
|
||||
* como TinyBlocks_Image (TB_VALUE_IMAGE, RGBA).
|
||||
*/
|
||||
#ifndef TINYBLOCKS_PNG_H
|
||||
#define TINYBLOCKS_PNG_H
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
TB_API const TinyBlocks_LibraryDescriptor* tb_png_get_library(void);
|
||||
|
||||
TB_API TinyBlocks_Image* tb_png_load(const char* path);
|
||||
TB_API bool tb_png_save(const TinyBlocks_Image* img, const char* path);
|
||||
TB_API const char* tb_png_last_error(void);
|
||||
|
||||
#endif /* TINYBLOCKS_PNG_H */
|
||||
@@ -0,0 +1,15 @@
|
||||
# Metadados da library png. Lido pela UI/build sem recompilar o .so.
|
||||
[library]
|
||||
name = "tinyblocks-png"
|
||||
version = "1.0.0"
|
||||
category = "PNG"
|
||||
description = "Imagens PNG: carregar e gravar (libpng)"
|
||||
color = [0, 172, 193, 255]
|
||||
dark = [0, 131, 143, 255]
|
||||
|
||||
[build]
|
||||
sources = ["src/tb_png.c"]
|
||||
includes = ["include"]
|
||||
shared = "build/libtinyblocks-png.so"
|
||||
static = "build/libtinyblocks-png.a"
|
||||
depends = ["libpng"]
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* TinyBlocks - tb_png.c
|
||||
* Categoria "PNG": PNG.Load / PNG.Save (libpng, API simplificada png_image).
|
||||
* As imagens sao sempre convertidas para RGBA em memoria, de modo que a
|
||||
* previa (balao) do editor funciona independente do formato de origem.
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <png.h>
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
#include "tb_png.h"
|
||||
|
||||
static char s_err[200] = "";
|
||||
const char* tb_png_last_error(void) { return s_err; }
|
||||
|
||||
TinyBlocks_Image* tb_png_load(const char* path) {
|
||||
s_err[0] = 0;
|
||||
if (!path) { snprintf(s_err, sizeof(s_err), "caminho nulo"); return NULL; }
|
||||
png_image pv;
|
||||
memset(&pv, 0, sizeof(pv));
|
||||
pv.version = PNG_IMAGE_VERSION;
|
||||
if (!png_image_begin_read_from_file(&pv, path)) {
|
||||
snprintf(s_err, sizeof(s_err), "libpng: %s", pv.message);
|
||||
return NULL;
|
||||
}
|
||||
pv.format = PNG_FORMAT_RGBA;
|
||||
size_t sz = PNG_IMAGE_SIZE(pv);
|
||||
uint8_t* buf = (uint8_t*)malloc(sz ? sz : 1);
|
||||
if (!buf) { png_image_free(&pv); snprintf(s_err, sizeof(s_err), "sem memoria"); return NULL; }
|
||||
if (!png_image_finish_read(&pv, NULL, buf, 0, NULL)) {
|
||||
snprintf(s_err, sizeof(s_err), "libpng: %s", pv.message);
|
||||
free(buf); png_image_free(&pv); return NULL;
|
||||
}
|
||||
int w = (int)pv.width, h = (int)pv.height;
|
||||
png_image_free(&pv);
|
||||
TinyBlocks_Image* img = tb_image_new(w, h, 4);
|
||||
if (!img) { free(buf); snprintf(s_err, sizeof(s_err), "sem memoria"); return NULL; }
|
||||
memcpy(tb_image_data(img), buf, (size_t)w * h * 4);
|
||||
free(buf);
|
||||
return img;
|
||||
}
|
||||
|
||||
bool tb_png_save(const TinyBlocks_Image* img, const char* path) {
|
||||
s_err[0] = 0;
|
||||
if (!img || !path) { snprintf(s_err, sizeof(s_err), "imagem/caminho nulo"); return false; }
|
||||
int w = tb_image_width(img), h = tb_image_height(img);
|
||||
if (w <= 0 || h <= 0) { snprintf(s_err, sizeof(s_err), "imagem vazia"); return false; }
|
||||
size_t sz = (size_t)w * h * 4;
|
||||
uint8_t* buf = (uint8_t*)malloc(sz);
|
||||
if (!buf) { snprintf(s_err, sizeof(s_err), "sem memoria"); return false; }
|
||||
for (int y = 0; y < h; y++)
|
||||
for (int x = 0; x < w; x++) {
|
||||
uint8_t r, g, b, a;
|
||||
tb_image_get_pixel(img, x, y, &r, &g, &b, &a);
|
||||
uint8_t* p = buf + ((size_t)y * w + x) * 4;
|
||||
p[0] = r; p[1] = g; p[2] = b; p[3] = a;
|
||||
}
|
||||
png_image pv;
|
||||
memset(&pv, 0, sizeof(pv));
|
||||
pv.version = PNG_IMAGE_VERSION;
|
||||
pv.width = (png_uint_32)w;
|
||||
pv.height = (png_uint_32)h;
|
||||
pv.format = PNG_FORMAT_RGBA;
|
||||
bool ok = png_image_write_to_file(&pv, path, 0, buf, 0, NULL) != 0;
|
||||
if (!ok) snprintf(s_err, sizeof(s_err), "libpng: %s", pv.message);
|
||||
free(buf);
|
||||
return ok;
|
||||
}
|
||||
|
||||
/* -- Blocos -------------------------------------------------------------- */
|
||||
|
||||
static const char* in_text(TinyBlocks_Block* self, TinyBlocks* rt, uint32_t i) {
|
||||
TinyBlocks_Value v = tb_block_get_input(self, rt, i);
|
||||
return (v.kind == TB_VALUE_TEXT && v.as.text) ? v.as.text : "";
|
||||
}
|
||||
static TinyBlocks_Image* in_img(TinyBlocks_Block* self, TinyBlocks* rt, uint32_t i) {
|
||||
TinyBlocks_Value v = tb_block_get_input(self, rt, i);
|
||||
return v.kind == TB_VALUE_IMAGE ? v.as.image : NULL;
|
||||
}
|
||||
|
||||
static void eval_load(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
TinyBlocks_Image* img = tb_png_load(in_text(self, rt, 0));
|
||||
if (!img) { tinyblocks_set_error(rt, "%s", tb_png_last_error()); self->dirty = false; return; }
|
||||
tb_block_set_output(self, 0, tb_value_image(img));
|
||||
tb_image_release(img);
|
||||
self->dirty = false;
|
||||
}
|
||||
|
||||
static void eval_save(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
TinyBlocks_Image* img = in_img(self, rt, 0);
|
||||
if (!img || !tb_png_save(img, in_text(self, rt, 1)))
|
||||
tinyblocks_set_error(rt, "%s", tb_png_last_error());
|
||||
self->dirty = false;
|
||||
}
|
||||
|
||||
static bool reg(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib, const char* name,
|
||||
const TinyBlocks_SlotDesc* in, uint32_t ni,
|
||||
const TinyBlocks_SlotDesc* out, uint32_t no,
|
||||
void (*fn)(TinyBlocks_Block*, TinyBlocks*)) {
|
||||
TinyBlocks_TypeBlock* t = tb_type_block_create(rt, name, in, ni, out, no, fn);
|
||||
return t && tb_library_add(lib, &t->base);
|
||||
}
|
||||
|
||||
static bool png_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
|
||||
static const TinyBlocks_Category cat = {
|
||||
"PNG",
|
||||
{ 0/255.f, 172/255.f, 193/255.f, 1.f},
|
||||
{ 0/255.f, 131/255.f, 143/255.f, 1.f},
|
||||
};
|
||||
tb_library_set_category(lib, &cat);
|
||||
|
||||
static const TinyBlocks_SlotDesc out_img[] = {{"imagem", TB_VALUE_IMAGE}};
|
||||
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)
|
||||
&& reg(rt, lib, "PNG.Save", save_in, 2, NULL, 0, eval_save);
|
||||
}
|
||||
|
||||
TINYBLOCKS_DEFINE_LIBRARY(png, "tinyblocks-png", "1.0.0", png_init, NULL)
|
||||
|
||||
const TinyBlocks_LibraryDescriptor* tb_png_get_library(void) {
|
||||
return &_tb_lib_desc_png;
|
||||
}
|
||||
Reference in new issue
Block a user