Compare commits

...

8 Commits

Author SHA1 Message Date
11ba1e6212 Merge pull request 'bugfix/map-has-no-border' (#8) from bugfix/map-has-no-border into master
Reviewed-on: #8
2022-09-09 21:44:24 +00:00
0bfcfeb701 Merge branch 'master' into bugfix/map-has-no-border 2022-09-09 21:44:11 +00:00
Sarah
417f81d6a5 remove comment 2022-09-09 22:43:18 +01:00
Sarah
00a50f7ce5 refactor 2022-09-09 22:42:52 +01:00
Sarah
ead6655b7b Delete get_file.py 2022-09-09 21:44:10 +01:00
Sarah
573c1cd990 make some changes 2022-09-09 21:42:53 +01:00
Sarah
ed07915a4d add changes - DOESNT WORK 2022-09-09 21:31:40 +01:00
Sarah
da3b95065b add test script 2022-09-09 21:31:26 +01:00

View File

@ -2,7 +2,7 @@ import base64
from collections import Counter, OrderedDict from collections import Counter, OrderedDict
import csv import csv
import os import os
from wand.image import Image import pyvips
import worldmap import worldmap
import warnings import warnings
@ -94,8 +94,10 @@ def draw_map(films_by_country, file_name="vcinema_map.svg"):
worldmap.plot(countries, cmap=["#FF4000"], opacity=opacity, filename=file_name, verbose=False) worldmap.plot(countries, cmap=["#FF4000"], opacity=opacity, filename=file_name, verbose=False)
with Image(filename=file_name, width=1000, height=655) as i: image = pyvips.Image.new_from_file(file_name)
png_data = i.make_blob("png") image = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
png_data = image.write_to_buffer(".png")
os.remove(file_name) os.remove(file_name)