also ich hab ein gif bild und möchte nun ein anderes gif (weiß-transparent) drüber legen.
Also PIL -> Paste und ne ColorTable angelegt. Jetzt hab ich alles was schwarz ist (transparent nach schwarz) transparent. Problem ist nun, dass alles andere schwarz ist (statt weiß nun schwarz). Weiß wer, woran das liegen kann?
hier der code:
Code: Alles auswählen
from Tkinter import *
from PIL import Image, ImageTk
bla = Tk()
overlay = Image.open('a.gif')
background = Image.open('bt_350_27_2.gif')
colorTable = [256]*256
colorTable[0] = 0
mask = overlay.point (colorTable, '1')
background.paste(overlay, (4, 11), mask)
background.save("test.gif", "GIF")
image = ImageTk.PhotoImage(background)
label = Label(bla, image=image)
label.pack()
bla.mainloop()