Padding zero to png name

This commit is contained in:
hzwer
2020-11-17 12:39:07 +08:00
parent fc456bc844
commit 57c32f265a
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ cnt = 0
def writeframe(frame):
global cnt
if args.png:
cv2.imwrite('output/{}.png'.format(cnt), frame)
cv2.imwrite('output/{:0>8d}.png'.format(cnt), frame)
cnt += 1
else:
output.write(frame)

View File

@@ -45,7 +45,7 @@ cnt = 0
def writeframe(frame):
global cnt
if args.png:
cv2.imwrite('output/{}.png'.format(cnt), frame)
cv2.imwrite('output/{:0>8d}.png'.format(cnt), frame)
cnt += 1
else:
output.write(frame)