[Python] Resizing an image in Python using PIL

Discussão em 'Python' iniciado por Stack, Julho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to resize an image in Python, and did the following:

    from PIL import Image
    img = Image.open('1.jpg')
    img.resize((300,200))
    img.save('image','jpeg')


    In the result, the image remains the same size. Why is that? What could I be missing?

    Thanks.

    Continue reading...

Compartilhe esta Página