Fix fatal error in use case where source image size is smaller destination image size