-int img_output_png(FILE *f, const char *filename,
- unsigned width, unsigned height,
- unsigned char **framedata, unsigned char **mask,
- struct lbx_colour *palette);
+#include "image.h"
+
+typedef int img_output_func(FILE *f, const char *filename,
+ unsigned width, unsigned height,
+ unsigned char *pixels, unsigned char *pixel_mask,
+ struct lbx_colour *palette);
+
+img_output_func img_output_pbm, img_output_ppm, img_output_pam;
+img_output_func img_output_png;
+
+_Bool img_is_masked(unsigned char *mask, unsigned width, unsigned height);