Resizing Images using Pillow Python -


right i'm trying resize few .jpg files , script following:

from pil import image  def main( ): #{      filename = "amonstercallsmoviestill.jpg"      image = image.open(filename)     size = width, height = image.size      image.thumbnail((1600,900))      image.show()      del image #}  if (__name__ == "__main__" ): #{      main() #} 

i trying resize amonstercallsmoviestill.jpg (1600,900) doesn't seem working.

i've tried (300,300) , work whenever attempting thumbnail (1600,900) doesn't seem work.

thank you!

thumbnail reduces size of image. make bigger, use resize instead.

image = image.resize((1600, 900), pil.image.lanczos) 

Comments