I tried the following code to resize images in a directory but it ended up with this error error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize
import cv2
import numpy as numpy
for idx in range(85):
im = cv2.imread('IDRiD_'+str(idx)+'.jpg')
im1 = cv2.resize(im, (0,0), fx=0.2, fy=0.2)
cv2.imwrite('resized_image\IDRID'+str(idx)+'.jpg', im1)
print('IDRiD_'+str(idx)+'.jpg is resized')