skip optipng for animations

This commit is contained in:
byte[] 2021-04-07 15:16:43 -04:00
parent 192cb727a0
commit 4e7928ab32

View file

@ -15,9 +15,14 @@ defmodule Philomena.Processors.Png do
} }
end end
def post_process(_analysis, file) do def post_process(analysis, file) do
if analysis.animated? do
# libpng has trouble with animations, so skip optimization
%{}
else
%{replace_original: optimize(file)} %{replace_original: optimize(file)}
end end
end
def intensities(_analysis, file) do def intensities(_analysis, file) do
{:ok, intensities} = Intensities.file(file) {:ok, intensities} = Intensities.file(file)