img.resize returns the resized image, does not do in-place resize! Fix.