From 6acb88a1569c44f1bbd302630cc8fc21bbb45282 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 5 Sep 2013 20:46:20 -0400 Subject: [PATCH] Logic was wrong for selecting the image width. --- copyvios/background.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyvios/background.py b/copyvios/background.py index 704c626..a11efe7 100644 --- a/copyvios/background.py +++ b/copyvios/background.py @@ -108,7 +108,7 @@ def _get_site(): def _build_url(screen, filename, url, imgwidth, imgheight): width = screen["width"] if float(imgwidth) / imgheight > float(screen["width"]) / screen["height"]: - width = int(float(imgwidth) / imgheight * screen["width"]) + width = int(float(imgwidth) / imgheight * screen["height"]) if width >= imgwidth: return url url = url.replace("/commons/", "/commons/thumb/")