forked from gamingrobot/WotMiniMapMaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanualconverter.py
36 lines (28 loc) · 939 Bytes
/
manualconverter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def main():
import Image
themap = raw_input("Map: ")
background = Image.open("mapsRaw/" + themap + "/mmap.png")
gametype = raw_input("Gametype: ")
thescale = int(raw_input("Scale: "))
done = False
while(done != True):
foreground = Image.open("icon/" + raw_input("Marker Filename: ") + ".png")
inx = int(raw_input("X:"))
iny = int(raw_input("Y:"))
#0-1000 instead of -500-500
inx += thescale
iny += thescale
#scale to 500x500
doublescale = thescale * 2
divscale = doublescale / 500.0
inx /= divscale
iny /= divscale
#fix icon size
inx -= 24
iny += 24
background.paste(foreground, (int(inx), int(500 - iny)), foreground)
if raw_input("Done?") == "y":
done = True
background.save("maps/" + themap + "_" + gametype + ".png")
if __name__ == '__main__':
main()