geo/map bugfixes

This commit is contained in:
rolux 2011-11-24 19:38:10 +01:00
commit dfd2787438
14 changed files with 892 additions and 809 deletions

View file

@ -1,6 +1,7 @@
import Image
import json
import os
import sys
svg_path = '../svg/icons/'
png_path = '../png/icons/4096/'
@ -21,16 +22,17 @@ for file in os.listdir(svg_path):
image = image.resize((size, size), Image.ANTIALIAS)
image.save(png_file.replace('/4096/', '/%d/' % size))
for file in os.listdir('../png/flags/'):
if file[-4:] == '.png':
country = file[:-4]
png_file = png_path + country + '.png'
print png_file
image = Image.open(png_file)
# include 4096 to overwrite manually generated image
for size in [4096, 1024, 256, 64, 16]:
image = image.resize((size, size), Image.ANTIALIAS)
image.save(png_file.replace('/4096/', '/%d/' % size))
if sys.argv[-1] == '-png':
for file in os.listdir('../png/flags/'):
if file[-4:] == '.png':
country = file[:-4]
png_file = png_path + country + '.png'
print png_file
image = Image.open(png_file)
# include 4096 to overwrite manually generated image
for size in [4096, 1024, 256, 64, 16]:
image = image.resize((size, size), Image.ANTIALIAS)
image.save(png_file.replace('/4096/', '/%d/' % size))
image = Image.new('RGB', (1152,1152))
f = open('../json/countries.json')