title: How to read all image from folder and save image with same name in other folder python
body: <p>I have images in the folder my file name is <strong>Doc0006.Row1City.jpg</strong>. the following code save the image after cropping with the same name but I want to save the image like this <strong>Doc0006.Row1City_augment.jpg</strong> where I can change in this code</p>
  <pre><code>import os.path
  import glob
  import cv2
  def convertjpg(jpgfile,outdir):
      
      src = cv2.imread(jpgfile, cv2.IMREAD_UNCHANGED)
      
      try:
          dst = src[100:500, 200:600] 
          #dst = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY)
          print(dst.shape)
          cv2.imwrite(os.path.join(outdir,os.path.basename(jpgfile)), dst)
      except Exception as e:
          print(e)
          
  for jpgfile in glob.glob(r'/home/hammad/thyroid/data/Hammad/Hammad/HH_Scans_Prediction/7104220_576_F/OriginalScan/*.png'):
      convertjpg(jpgfile,r&quot;/home/hammad/thyroid/data/Hammad/Hammad/HH_Scans_Prediction/7104220_576_F/Cropped/&quot;)
  </code></pre>