aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar bai 2020-07-28 05:33:19 -0400
committerLibravatar bai 2020-07-28 05:33:19 -0400
commit8102e461d107adfb8958bb7a8e28a9ca9ff540ee (patch)
tree837f8832336d2af8bedd576b52f0df8b115bece7
parent6513d960466a7819fbf2bf3f473c8133621ddaa9 (diff)
downloadweabot-8102e461d107adfb8958bb7a8e28a9ca9ff540ee.tar.gz
weabot-8102e461d107adfb8958bb7a8e28a9ca9ff540ee.tar.xz
weabot-8102e461d107adfb8958bb7a8e28a9ca9ff540ee.zip
Arreglado error al usar spoilers en miniaturas
-rw-r--r--cgi/img.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cgi/img.py b/cgi/img.py
index 9bc25b7..48d4277 100644
--- a/cgi/img.py
+++ b/cgi/img.py
@@ -108,7 +108,7 @@ def processImage(post, data, t, originalname, spoiler=False):
"%dx%d" % (file_thumb_width, file_thumb_height), "-blur", "0x12",
"-gravity", "center", "-fill", "rgba(0,0,0, .6)",
"-draw", "rectangle 0,%d,%d,%d" % ((file_thumb_height/2)-10, file_thumb_width, (file_thumb_height/2)+7),
- "-fill", "white", "-annotate", "0", "Alerta de spoiler",
+ "-fill", "white", "-font", "Liberation-Sans", "-annotate", "0", "Alerta de spoiler",
"-quality", str(Settings.THUMB_QUALITY), file_thumb_path])
elif used_filetype['mime'][:5] == 'audio':
# we do an exception and use png for audio waveform thumbnails since they
@@ -135,7 +135,8 @@ def processImage(post, data, t, originalname, spoiler=False):
"white", "-flatten", "-resize", "%dx%d" % (file_thumb_width, file_thumb_height)]
if spoiler:
args += ["-blur", "0x12", "-gravity", "center", "-fill", "rgba(0,0,0, .6)", "-draw", "rectangle 0,%d,%d,%d" % (
- (file_thumb_height/2)-10, file_thumb_width, (file_thumb_height/2)+7), "-fill", "white", "-annotate", "0", "Alerta de spoiler"]
+ (file_thumb_height/2)-10, file_thumb_width, (file_thumb_height/2)+7), "-fill", "white",
+ "-font", "Liberation-Sans", "-annotate", "0", "Alerta de spoiler"]
args += ["-quality", str(Settings.THUMB_QUALITY), file_thumb_path]
# generate thumbnails