fixed warnings
fixed image code
Merge pull request #31 from pfefferle/master

Fixes some warnings. Thanks to pfefferle.