png resizing: depending on error messages with pngs is flawy