consider all translucent values to be transparent for palette generation

This commit is contained in:
byte[] 2020-09-08 01:49:07 -04:00
parent bd2e9b4171
commit 4e227f1252

View file

@ -84,7 +84,7 @@ defmodule Philomena.Processors.Gif do
scaled = Briefly.create!(extname: ".gif")
scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease"
palette_filter = "paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle"
palette_filter = "paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle:alpha_threshold=255"
filter_graph = "[0:v]#{scale_filter}[x];[x][1:v]#{palette_filter}"
{_output, 0} =