diff --git a/visualdl/utils/img_util.py b/visualdl/utils/img_util.py index 0bb64c06f4aa9ada5f9a5d813fec27ecd1d2a7b8..3d338e7aa9b8849cb1df41ff43e500e722b1ccc6 100644 --- a/visualdl/utils/img_util.py +++ b/visualdl/utils/img_util.py @@ -28,7 +28,9 @@ def padding_image(img, height, width): width_before = math.floor((width - width_old) / 2) width_after = width - width_old - width_before - return np.pad(img, ((height_before, height_after), (width_before, width_after), (0, 0))) + return np.pad(array=img, + pad_width=((height_before, height_after), (width_before, width_after), (0, 0)), + mode="constant") def merge_images(imgs, dataformats, scale=1.0, rows=-1):