[Python] Opening a GIF picture with PIL in Python

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to open a GIF file.

    Syntax Error


    It is coming up with a syntax error I do not understand:

    [​IMG]

    What I tried


    Does the image have to change to PNG/JPEG ?

    I am trying to keep transparency which would be lost if I have to change the file type.

    I have tried to keep the image and open it with Turtle by using screen.addshape. That works for the image.

    However I have had a problem with resizing the image so I am having to use the PIL library to open the images and then resize them.

    Continue reading...

Compartilhe esta Página