Page 2 of 2

Posted: Thu Jan 26, 2012 2:03 pm
by aurora
i liked this one and the name is -- again -- hint enough to solve it. just opened it in some image manipulating app and layered the images one over the other, after making the white "background" transparent.

Posted: Sat Apr 30, 2016 5:07 pm
by Napoleon

Code: Select all

from PIL import Image
import os
imgs = [Image.open('masgo-1.gif'),Image.open('masgo-2.gif')]
for i in range(2):
	img = imgs[i-1].convert("RGBA")
	datas = img.getdata()
	newData = []
	for item in datas:
		if item[0] == 255 and item[1] == 255 and item[2] == 255:
			newData.append((255, 255, 255, 0))
		else:
			newData.append(item)
	img.putdata(newData)
	img.save("temp"+str(i)+".png", "PNG");
background = Image.open("temp0.png")
foreground = Image.open("temp1.png")
background.paste(foreground, (0, 0), foreground)
background.show()
os.remove("temp0.png");
os.remove("temp1.png");
[/code]

Posted: Sat Jul 09, 2016 5:50 pm
by Riddle
The easiest way to solve this is by opening as layers in gimp and turning white into alpha.