fix assert error when resampling an image to an invalid size (corrupted stamps)