Traffic map timstamp
Added a timestamp to the traffic maps so you know how much it's aged.
This commit is contained in:
parent
19368510f3
commit
5a4886ad65
@ -892,6 +892,12 @@ class NRSC5_DUI(object):
|
||||
imgMap.paste(Image.open(tileFile), (j*200, i*200)) # paste tile into map
|
||||
os.remove(tileFile) # delete tile image
|
||||
|
||||
# now put a timestamp on it.
|
||||
imgMap = imgMap.convert("RGBA")
|
||||
posTS = (imgMap.size[0]-235, imgMap.size[1]-29) # calculate position to put timestamp (bottom right)
|
||||
imgTS = self.mkTimestamp(t, imgMap.size, posTS) # create timestamp
|
||||
imgMap = Image.alpha_composite(imgMap, imgTS) # overlay timestamp
|
||||
|
||||
imgMap.save(os.path.join(mapDir, "TrafficMap.png")) # save traffic map
|
||||
|
||||
# display on map page
|
||||
|
Loading…
Reference in New Issue
Block a user