Skip to content

Instantly share code, notes, and snippets.

@kira924age
Created December 8, 2015 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kira924age/5e5ec8686d79dfc444b8 to your computer and use it in GitHub Desktop.
Save kira924age/5e5ec8686d79dfc444b8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from PIL import Image
gif0 = Image.open('fuga-0.gif')
gif1 = Image.open('fuga-1.gif')
gif2 = Image.open('fuga-2.gif')
gif3 = Image.open('fuga-3.gif')
gif4 = Image.open('fuga-4.gif')
gif5 = Image.open('fuga-5.gif')
gif6 = Image.open('fuga-6.gif')
gif7 = Image.open('fuga-7.gif')
gif8 = Image.open('fuga-8.gif')
gif9 = Image.open('fuga-9.gif')
gif10 = Image.open('fuga-10.gif')
gif11 = Image.open('fuga-11.gif')
gif12 = Image.open('fuga-12.gif')
gif13 = Image.open('fuga-13.gif')
gif14 = Image.open('fuga-14.gif')
gif15 = Image.open('fuga-15.gif')
gif16 = Image.open('fuga-16.gif')
gif17 = Image.open('fuga-17.gif')
gif18 = Image.open('fuga-18.gif')
gif19 = Image.open('fuga-19.gif')
gif20 = Image.open('fuga-20.gif')
gif21 = Image.open('fuga-21.gif')
gif22 = Image.open('fuga-22.gif')
gif23 = Image.open('fuga-23.gif')
gif24 = Image.open('fuga-24.gif')
gif25 = Image.open('fuga-25.gif')
gif26 = Image.open('fuga-26.gif')
gif27 = Image.open('fuga-27.gif')
gif28 = Image.open('fuga-28.gif')
gif29 = Image.open('fuga-29.gif')
gif30 = Image.open('fuga-30.gif')
gif31 = Image.open('fuga-31.gif')
gif32 = Image.open('fuga-32.gif')
gif33 = Image.open('fuga-33.gif')
gif34 = Image.open('fuga-34.gif')
gif35 = Image.open('fuga-35.gif')
gif36 = Image.open('fuga-36.gif')
gif37 = Image.open('fuga-37.gif')
gif38 = Image.open('fuga-38.gif')
gif39 = Image.open('fuga-39.gif')
gif40 = Image.open('fuga-40.gif')
gif41 = Image.open('fuga-41.gif')
width, height = gif0.size
png = Image.new('RGB', gif0.size, 'black')
for pos in ((x, y) for x in range(width) for y in range(height)):
if gif0.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif1.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif2.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif3.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif4.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif5.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif6.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif7.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif8.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif9.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif10.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif11.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif12.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif13.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif14.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif15.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif16.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif17.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif18.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif19.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif20.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif21.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif22.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif23.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif24.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif25.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif26.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif27.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif28.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif29.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif30.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif31.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif32.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif33.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif34.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif35.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif36.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif37.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif38.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif39.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif40.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
if gif41.getpixel(pos) == 0xff:
png.putpixel(pos, (0xff, 0xff, 0xff))
png.save('flag.png', 'PNG')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment