My image is not transparent when I am using ImageTk
The problem is image
option of Map.create_image(updatex, y, image = self.image)
requires a PhotoImage instance but you're giving it a label, so to fix it just say.
class Player: def __init__(self, hp, image): self.hp = hp self.image = image #creating an instance variable self.pic = ImageTk.PhotoImage(self.image) #making an photoimage instance self.cv = Map.create_image(updatex, y, image = self.pic) #passing the photo image instance self.pic.image = self.pic #keeping a reference to the image
Hope this has solved the error, do let me know if any errors or doubts.