From 0f3c477ff34238733417357ab11f6a4dfb8db28f Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 28 Oct 2019 10:46:59 -0400 Subject: Remove dependency on ImageMagick (replace with rsvg-convert) --- src/invidious/users.cr | 4 ++-- src/invidious/views/login.ecr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/invidious/users.cr b/src/invidious/users.cr index 4a3dba0a..afb100f2 100644 --- a/src/invidious/users.cr +++ b/src/invidious/users.cr @@ -195,7 +195,7 @@ def generate_captcha(key, db) end clock_svg = <<-END_SVG - + 1 @@ -219,7 +219,7 @@ def generate_captcha(key, db) END_SVG image = "" - convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true, + convert = Process.run(%(rsvg-convert -w 400 -h 400 -b none -f png), shell: true, input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc| image = proc.output.gets_to_end image = Base64.strict_encode(image) diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr index 4b5c7e6d..59fa90e5 100644 --- a/src/invidious/views/login.ecr +++ b/src/invidious/views/login.ecr @@ -43,7 +43,7 @@ <% case captcha_type when %> <% when "image" %> <% captcha = captcha.not_nil! %> - + <% captcha[:tokens].each_with_index do |token, i| %> <% end %> -- cgit v1.2.3