Fixed image format recognition
Merge pull request #1 from JanneMantyharju/ruby2

Fixed image format recognition