void gfximage_save_jpeg(gfximage_t*image, const char*filename, int quality);
void gfximage_save_png(gfximage_t*image, const char*filename);
gfximage_t* gfximage_rescale(gfximage_t*image, int newwidth, int newheight);
+void gfximage_free(gfximage_t*b);
#endif
//---- bitmap handling ----
-gfximage_t* gfximage_new(RGBA*data, int width, int height)
+static gfximage_t* gfximage_new(RGBA*data, int width, int height)
{
gfximage_t* b = (gfximage_t*)rfx_calloc(sizeof(gfximage_t));
b->data = (gfxcolor_t*)data;
return b;
}
-void gfximage_free(gfximage_t*b)
-{
- free(b->data); //!
- b->data = 0;
- free(b);
-}
-
static gfximage_t* findimage(render_t*r, U16 id)
{
character_t*c = (character_t*)map16_get_id(r->id2char, id);