Larger Image than the Frame

Asked

Viewed 26 times

0

I need the image of a graphic, just stay inside the green frame, I can see the whole picture. Can anyone help me complete this goal ? Below is the function attached to the Seletionsort button, which when I click on it appears the graphic image.

def criaLabel(self, event):
        image = Image.open("barra.jpg")
        photo = ImageTk.PhotoImage(image)
        self.label = Label(self.Frame3, text = "adicionando", image = photo)
        self.label.image = photo
        self.label.place(x = 0, y = 0)

inserir a descrição da imagem aqui

1 answer

1

take the output of the so-called Image.open, and create another rescheduled image

image = Image.open("barra.jpg")
image2 = image.resize((100, 100))
  • Thanks Elton, you’ve helped me a lot!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.