image resizing: fix a problem with some pngs; reported by urban