Files

20 lines
705 B
C

/*
* TinyBlocks - tb_ppm.h
* Library tinyblocks-ppm: carrega/grava imagens Netpbm (P6 binario e P3 ASCII)
* como TinyBlocks_Image (TB_VALUE_IMAGE). Independente do editor.
*/
#ifndef TINYBLOCKS_PPM_H
#define TINYBLOCKS_PPM_H
#include <tinyblocks/tinyblocks.h>
TB_API const TinyBlocks_LibraryDescriptor* tb_ppm_get_library(void);
/* Carrega um .ppm (P6/P3). Retorna NULL em erro; use tb_ppm_last_error(). */
TB_API TinyBlocks_Image* tb_ppm_load(const char* path);
/* Grava a imagem como P6 binario (converte cinza/RGBA para RGB). */
TB_API bool tb_ppm_save(const TinyBlocks_Image* img, const char* path);
TB_API const char* tb_ppm_last_error(void);
#endif /* TINYBLOCKS_PPM_H */