Implement image file handling.
Correct file line endings.
Merge pull request #1 from pep1/master

Implement image file handling in PHP