yostudios / Spritemapper

CSS Spritemap Generator
http://yostudios.github.com/Spritemapper/
MIT License
595 stars 42 forks source link

spritecss.png.FormatError: FormatError: PNG file has invalid signature. #18

Open ghost opened 13 years ago

ghost commented 13 years ago

Please change the error message to display the invalid file.

More often than not (as reported in other issues), the following error message is issued:

spritecss.png.FormatError: FormatError: PNG file has invalid signature.

It is not helpful as it is unrelated to the actual error. It seems to indicate a parsing error on an unsupported image format, sometimes. But other issues seem to indicate that it can happen when a parse error occurs on a background: stanza. I've tried numerous combinations of my CSS input file and always got the same error message. I used strace to try to guess where it failed but did not get more information. I tried --verbose which reported to use a number of files but did not report which would be invalid.

I eventually removed the jpg file and it solved the problem.

I hope the short storry of my frustrating experience will inspire someone to produce a patch that displays a clear error message such as "XXX.jpg : unsupported file format" ;-)

marcoqu commented 11 years ago

This would really help. I also don't understand what's wrong with my .pngs.