Page 1 of 1
Setting some background color in gifs
Posted: 2016-10-14T19:18:25-07:00
by IamBGthegreat
I'm setting some background color in some of my gifs. But this problem occurs, it doesn't fill the whole background.
The problem:
http://imgur.com/a/Yaipm
Original image:
http://imgur.com/a/kbgEL
I'm running on windows 10, here's the code that I used:
Code: Select all
convert .gif -transparent white .gif
Then after that:
Code: Select all
convert .gif -fill green1 -opaque none .gif
Any solutions on how to solve this problem? I've been into this since last week.
Re: Setting some background color in gifs
Posted: 2016-10-14T19:46:35-07:00
by fmw42
Your white is not pure white, so you need to add -fuzz XX%
Code: Select all
convert test.gif -fuzz 10% -transparent "white" result.gif
Re: Setting some background color in gifs
Posted: 2016-10-14T20:35:30-07:00
by IamBGthegreat
fmw42 wrote:Your white is not pure white, so you need to add -fuzz XX%
Code: Select all
convert test.gif -fuzz 10% -transparent "white" result.gif
Hey, thanks for helping me. Here's the result with the fuzz:
http://imgur.com/a/76VSI
Then I add the this code again:
Code: Select all
convert .gif -fill green1 -opaque none .gif
http://imgur.com/a/u8ejt Final result
Re: Setting some background color in gifs
Posted: 2016-10-14T21:39:54-07:00
by GeeMack
IamBGthegreat wrote:I'm setting some background color in some of my gifs. But this problem occurs, it doesn't fill the whole background.
Try something like this...
Code: Select all
convert original.gif -coalesce -background green1 -alpha remove output.gif
That should lay the entire animation onto a green background. That "-coalesce" operation is what makes it fill the whole background on every frame.
Re: Setting some background color in gifs
Posted: 2016-10-14T23:36:22-07:00
by IamBGthegreat
GeeMack wrote:IamBGthegreat wrote:I'm setting some background color in some of my gifs. But this problem occurs, it doesn't fill the whole background.
Try something like this...
Code: Select all
convert original.gif -coalesce -background green1 -alpha remove output.gif
That should lay the entire animation onto a green background. That "-coalesce" operation is what makes it fill the whole background on every frame.
Woahhh!! It worked! Thank you so much my friend
Here is the result:
http://imgur.com/a/c5AyW