Skip to content

Commit b279127

Browse files
authored
Fix bug in merge_images function
1 parent 611ab39 commit b279127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

visualdl/utils/img_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def padding_image(img, height, width):
3535

3636
def merge_images(imgs, dataformats, scale=1.0, rows=-1):
3737
assert rows <= len(imgs), "rows should not greater than numbers of pictures"
38-
channel = imgs[0].shape[2]
3938
# convert format of each image to `hwc`
4039
for i, img in enumerate(imgs):
4140
imgs[i] = convert_to_HWC(img, dataformats)
4241

42+
channel = imgs[0].shape[2]
4343
height = -1
4444
width = -1
4545

0 commit comments

Comments
 (0)