generate slightly better jpeg thumbs

This commit is contained in:
Luna D 2020-04-29 17:12:40 +02:00 committed by byte[]
parent 74d29d8f59
commit 551fed5b0d

View file

@ -58,7 +58,18 @@ defmodule Philomena.Processors.Jpeg do
scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease"
{_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])