Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
IamBGthegreat
Posts: 7 Joined: 2016-09-25T10:33:52-07:00
Authentication code: 1151
Post
by IamBGthegreat » 2016-10-14T19:18:25-07:00
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.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-10-14T19:46:35-07:00
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
GeeMack
Posts: 718 Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA
Post
by GeeMack » 2016-10-14T21:39:54-07:00
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.
IamBGthegreat
Posts: 7 Joined: 2016-09-25T10:33:52-07:00
Authentication code: 1151
Post
by IamBGthegreat » 2016-10-14T23:36:22-07:00
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