Fix bug in Image::resize
(#461)