title: Is there any way to forcibly resize an image to a given dimension in python?
body: <p>I am using the pillow library. I have an image whose dimension is 1280x1920. When I upload the image, I want to resize the image to 800x600. But after uploading, the image resized to 475x350. Is there any way to forcibly resize the image into the given dimension? This is my code to resize the image in Django:</p>
  <pre><code>img = Image.open(self.image.path)
  
  if img.width &gt; 800 or img.height &gt; 600:
      img.resize((800, 600), Image.ANTIALIAS)
      img.save(self.image.path)
  </code></pre>