X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpng.c;h=17381514f46cd9876043a221cb2a579203d990e8;hb=6487933fe6b496bb04cd287b51b96af6b7d97058;hp=d71c19bc05c542be31b00f65f72450f4f079e3d8;hpb=08aec55c59be9ddc638a655266edb5155ec42b73;p=swftools.git diff --git a/lib/png.c b/lib/png.c index d71c19b..1738151 100644 --- a/lib/png.c +++ b/lib/png.c @@ -122,7 +122,7 @@ static int png_read_header(FILE*fi, struct png_header*header) return 0; } if(a!=8 && (b==2 || b==6)) { - printf("Bpp %d in mode %d not supported!\n", a); + printf("Bpp %d in mode %d not supported!\n", b, a); return 0; } if(c!=0) { @@ -486,6 +486,7 @@ EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char } if(!png_read_header(fi, &header)) { + fclose(fi); return 0; }