PNG I/O pull request by github user pornel, changed to not break BMP I/O