Created
September 21, 2013 14:31
-
-
Save noisy/6651191 to your computer and use it in GitHub Desktop.
#tysiacpompek
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import images2gif | |
from PIL import ImageDraw | |
from PIL import ImageFont | |
font_tag = ImageFont.truetype("FreeMono.ttf", 24) | |
font_counter = ImageFont.truetype("FreeSansBold.ttf", 24) | |
frames = images2gif.readGif("bale.gif", False) | |
current = 746 | |
done = 10 | |
t = range(current-done, current) | |
t.reverse() | |
new_frames = [] | |
j=0 | |
for i in t: | |
for frame in frames: | |
new_frame = frame.copy() | |
draw = ImageDraw.Draw(new_frame) | |
draw.text((260, 10),"#tysiacpompek",(255,255,255),font=font_tag) | |
draw.text((450, 210*(float(j)/done)), str(i+1), (255,255,255),font=font_counter) | |
new_frames.append(new_frame.copy()) | |
j += 1 | |
images2gif.writeGif('pompki.gif', new_frames) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment