title: Resizing all images in a folder
body: <pre><code>import numpy as np
  import cv2
  import os 
  
  if not os.path.exists('small'):
     os.makedirs('small')
  pic_num=1   
  
  for i in ['test']:
  
   try:
    if os.path.exists(str(pic_num)+'.jpg'):
        print(i)
        img=cv2.imread(str(pic_num)+'.jpg')
        resized_image=cv2.resize(img,(100,100))
        cv2.imwrite("small/"+str(pic_num)+'.jpg',resized_image)
    pic_num+=1 
   except Exception as e:
        print(str(e))
  </code></pre>
  
  <p>I am creating a path small to keep all the resized images from the "test directory" to "small" 
  everything seems fine plzz help me to decode it</p>