mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Use svgstat instead of magick for svg file analysis
This commit is contained in:
parent
fbae2a9185
commit
c9a47b2e82
2 changed files with 3 additions and 2 deletions
|
@ -12,6 +12,7 @@ RUN git clone https://github.com/philomena-dev/cli_intensities /tmp/cli_intensit
|
|||
|
||||
ADD https://api.github.com/repos/philomena-dev/mediatools/git/refs/heads/master /tmp/mediatools_version.json
|
||||
RUN git clone https://github.com/philomena-dev/mediatools /tmp/mediatools \
|
||||
&& ln -s /usr/lib/librsvg-2.so.2 /usr/lib/librsvg-2.so \
|
||||
&& cd /tmp/mediatools \
|
||||
&& make -j$(nproc) install
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ defmodule Philomena.Analyzers.Svg do
|
|||
end
|
||||
|
||||
defp stats(file) do
|
||||
case System.cmd("identify", ["-format", "%W %H\n", file]) do
|
||||
case System.cmd("svgstat", [file]) do
|
||||
{output, 0} ->
|
||||
[width, height] =
|
||||
[_size, _frames, width, height, _num, _den] =
|
||||
output
|
||||
|> String.trim()
|
||||
|> String.split(" ")
|
||||
|
|
Loading…
Reference in a new issue