title: python how to resize(shrink) image without losing quality
body: <p>I want to resize png picture 476x402 to 439x371, and I used resize method of PIL(image) or opencv, however, it will loss some sharp. After resize, The picture becomes blurred.
  How to resize(shrink) image without losing sharpness with use python?</p>
  <pre><code>from skimage import transform, data, io
  from PIL import Image
  import os
  import cv2
  
  infile = 'D:/files/script/org/test.png'
  outfile = 'D:/files/script/out/test.png'
  
  ''' PIL'''
  def fixed_size1(width, height):
      im = Image.open(infile)
      out = im.resize((width, height),Image.ANTIALIAS)
      out.save(outfile)
  
  ''' open cv'''
  def fixed_size2(width, height):
      img_array = cv2.imread(infile)
      new_array = cv2.resize(img_array, (width, height), interpolation=cv2.INTER_CUBIC)
      cv2.imwrite(outfile, new_array)
  
  
  def fixed_size3(width, height):
      img = io.imread(infile)
      dst = transform.resize(img, (439, 371))
      io.imsave(outfile, dst)
  
  fixed_size2(371, 439)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/0nrfp.png" rel="noreferrer">src:476x402</a>
  <a href="https://i.stack.imgur.com/qOw9E.png" rel="noreferrer">resized:439x371</a></p>