From 4e227f1252255f07510862fbad23cd76c707ff47 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Tue, 8 Sep 2020 01:49:07 -0400 Subject: [PATCH] consider all translucent values to be transparent for palette generation --- lib/philomena/processors/gif.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena/processors/gif.ex b/lib/philomena/processors/gif.ex index d8bca3b8..5ea07468 100644 --- a/lib/philomena/processors/gif.ex +++ b/lib/philomena/processors/gif.ex @@ -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} =