]> git.draconx.ca Git - liblbx.git/blobdiff - src/png.c
lbximg: Add support for Netpbm output.
[liblbx.git] / src / png.c
index 83aeec43583a354834a8e49bd525113fc50a6876..c52db03e599ef7f7e48d5982272c8ff5eadb8229 100644 (file)
--- a/src/png.c
+++ b/src/png.c
@@ -37,18 +37,6 @@ struct file_info {
        FILE *f;
 };
 
-static int is_masked(unsigned char **mask, unsigned width, unsigned height)
-{
-       for (unsigned y = 0; y < height; y++) {
-               for (unsigned x = 0; x < width; x++) {
-                       if (mask[y][x] == 0)
-                               return 1;
-               }
-       }
-
-       return 0;
-}
-
 static void fatal(png_structp png, int err, const char *fmt, ...)
 {
        va_list ap;
@@ -220,7 +208,7 @@ int img_output_png(FILE *f, const char *filename,
                    unsigned char **framedata, unsigned char **mask,
                   struct lbx_colour *palette)
 {
-       bool masked = is_masked(mask, width, height);
+       bool masked = img_is_masked(mask, width, height);
        struct file_info file = { filename, f };
        png_structp png;
        png_infop info;