Fix missing padding in Image::halveImage