user22579: I'm trying to convert all non-transparent pixels of an image to white using the geq filter in ffmpeg:
ffmpeg -y -i in.png -vf "format=rgba,geq='r=if(lt(alpha(X,Y),10),255):g=if(lt(alpha(X,Y),10),255):b=if(lt(alpha(X,Y),10),255):a=alpha(X,Y)'" x.png

But ffmpeg is giving me black pixels instead of white. Any ideas what is going on?
in.png: 

out.png: 


user1871: The two operand if expression returns 0 if the condition isn't met. You need the three operand version.
if(lt(alpha(X,Y),10),255,p(X,Y))


22579: <p>I'm trying to convert all non-transparent pixels of an image to white using the geq filter in ffmpeg:
<code>ffmpeg -y -i in.png -vf "format=rgba,geq='r=if(lt(alpha(X,Y),10),255):g=if(lt(alpha(X,Y),10),255):b=if(lt(alpha(X,Y),10),255):a=alpha(X,Y)'" x.png
</code></p>

<p>But ffmpeg is giving me black pixels instead of white. Any ideas what is going on?</p>

<p>in.png: </p>

<p><a href="https://i.stack.imgur.com/Dh36M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dh36M.png" alt="enter image description here"></a></p>

<p>out.png: </p>

<p><a href="https://i.stack.imgur.com/g8q1L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g8q1L.png" alt="enter image description here"></a></p>
 1871: <p>The two operand <code>if</code> expression returns 0 if the condition isn't met. You need the three operand version.</p>

<pre><code>if(lt(alpha(X,Y),10),255,p(X,Y))
</code></pre>
