diff options
author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-06-27 12:41:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 12:41:09 -0400 |
commit | 522ec4097d6f08c6a1025dac37f68152c47df339 (patch) | |
tree | a2e354b66f1abf18079f68bbe02d21b38418b9a2 | |
parent | 5b2ee61fd04f18478e3b5355ae19cd06a0840fa5 (diff) |
scraper image width fixes
-rw-r--r-- | src/scraping/buxton/scraper.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scraping/buxton/scraper.py b/src/scraping/buxton/scraper.py index fcffeac13..8766a54fd 100644 --- a/src/scraping/buxton/scraper.py +++ b/src/scraping/buxton/scraper.py @@ -116,22 +116,22 @@ def write_image(folder, name): data_doc_guid = guid() view_doc_guid = guid() + image = Image.open(f"{dist}/{folder}/{name}") + native_width, native_height = image.size + view_doc = { "_id": view_doc_guid, "fields": { "proto": protofy(data_doc_guid), "x": 10, "y": 10, - "width": 300, + "width": min(800, native_width), "zIndex": 2, "libraryBrush": False }, "__type": "Doc" } - image = Image.open(f"{dist}/{folder}/{name}") - native_width, native_height = image.size - data_doc = { "_id": data_doc_guid, "fields": { |