proper dimension handling

Signed-off-by: Henrik Myntti <henrik.myntti@gmail.com>
Merge branch 'master' of github.com:hankeypancake/imget