alternate way of getting image's dimensions

Should fix odyniec/imgareaselect#45 if @Huji is correct.