ImageLoader: spawn one thread per image. fix #93

In the process of fixing #93, I realized that we were spawning new
threads to fetch images for each update (we only need one).
This commit is contained in:
Mathieu PATUREL
2019-11-16 15:54:22 +11:00
parent cf68b2c202
commit e462e8b3bc
6 changed files with 23 additions and 22 deletions

View File

@ -26,6 +26,7 @@ def make_cache(image_name):
width, height = get_image_size(png)
png.seek(0)
base64.write(bytes("{}\n{}\n".format(width, height), encoding="utf-8"))
base64.write(b'data:image/png;base64,')
base64.write(b64encode(png.read()))