mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
skip optipng for animations
This commit is contained in:
parent
192cb727a0
commit
4e7928ab32
1 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue