pnmtopng crashes on zero-sized pictures: blauw:~/usr/src/lilypond$ cat pngcrash.pnm P5 0 0 255 blauw:~/usr/src/lilypond$ pnmtopng < pngcrash.pnm > /dev/null pnmtopng: fatal libpng error: No IDATs written into file pnmtopng: setjmp returns error condition (2)
Looking into it... Read ya, Phil
OK, after checking some documents and the libpng itself it seems as if PNG doesn't support 0x0 sized images. So the correct answer is that the input is already bogous. What could be done is to ignore the conversion of such an image and display an error message (which i'll do for the next release), but there is no sane way to convert such a valid PNM picture into a PNG image. To test it i hacked a modified version of pnmtopng where i output a empty IDAT block into the file if there image is 0x0 pixels, and no program can read that picture afterwards and complains about an invalid PNG image size. Hope this clarifies the situation. Read ya, Phil