bugfix: SubImage can return nil
Merge pull request #26 from aarzilli/master

bugfix: SubImage can return nil