Compare commits
No commits in common. "11ba1e621261203612602445912b0bee8e97dbf4" and "1f13c2e878a9147467537f211bdac5377f0364f2" have entirely different histories.
11ba1e6212
...
1f13c2e878
@ -2,7 +2,7 @@ import base64
|
|||||||
from collections import Counter, OrderedDict
|
from collections import Counter, OrderedDict
|
||||||
import csv
|
import csv
|
||||||
import os
|
import os
|
||||||
import pyvips
|
from wand.image import Image
|
||||||
import worldmap
|
import worldmap
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
@ -94,10 +94,8 @@ 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)
|
||||||
|
|
||||||
image = pyvips.Image.new_from_file(file_name)
|
with Image(filename=file_name, width=1000, height=655) as i:
|
||||||
image = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
|
png_data = i.make_blob("png")
|
||||||
|
|
||||||
png_data = image.write_to_buffer(".png")
|
|
||||||
|
|
||||||
os.remove(file_name)
|
os.remove(file_name)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user