title: Python: how to Image.resize in a for loop?
body: <p>I am trying to make an for-loop which is run through an list with 4 values:
  <code>16, 32, 64, 128</code>. </p>
  
  <p>These are the four sizes the script need to resize images to.</p>
  
  <p>This is my full code:</p>
  
  <pre><code>def on_btn_resize_clicked(self, widget):
      if len(self.imgOriginal) &gt; 0 and len(self.appRoot) &gt; 0: #check if original-image and app-root is select
          _imgFilename = os.path.splitext(basename(self.imgOriginal))[0] #get filename
          _imgFileExtension = os.path.splitext(basename(self.imgOriginal))[1] # get filextension
  
          quickly_sizes = [16, 32, 64, 128] #define all sizes, resize to 16x16, 32x32, 64x64, 128x128
          for size in quickly_sizes:
              print size
              im=Image.open(self.imgOriginal)
              im = im.convert("RGB")
              im = im.resize((int(size), int(size)), Image.ANTIALIAS)
              im.save(self.appRoot+"/data/media/"+_imgFilename+str(size)+_imgFileExtension)
  
          widget.set_label("All four images is save!")
          from subprocess import call
          call(["nautilus", self.appRoot+"/data/media/"]) #open/show folder where all files is save
  </code></pre>
  
  <p>The loop is running, but it does not save the images in the folder.</p>
  
  <p>What am I doing wrong?</p>