mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
generate slightly better jpeg thumbs
This commit is contained in:
parent
74d29d8f59
commit
551fed5b0d
1 changed files with 12 additions and 1 deletions
|
@ -58,7 +58,18 @@ defmodule Philomena.Processors.Jpeg do
|
||||||
scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease"
|
scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease"
|
||||||
|
|
||||||
{_output, 0} =
|
{_output, 0} =
|
||||||
System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-vf", scale_filter, scaled])
|
System.cmd("ffmpeg", [
|
||||||
|
"-loglevel",
|
||||||
|
"0",
|
||||||
|
"-y",
|
||||||
|
"-i",
|
||||||
|
file,
|
||||||
|
"-vf",
|
||||||
|
scale_filter,
|
||||||
|
"-q:v",
|
||||||
|
"1",
|
||||||
|
scaled
|
||||||
|
])
|
||||||
|
|
||||||
{_output, 0} = System.cmd("jpegtran", ["-optimize", "-outfile", scaled, scaled])
|
{_output, 0} = System.cmd("jpegtran", ["-optimize", "-outfile", scaled, scaled])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue