imagemagick crashing on me

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?".
Post Reply
wriggles
Posts: 3
Joined: 2015-07-19T18:46:05-07:00
Authentication code: 1151

imagemagick crashing on me

Post by wriggles »

I'm trying to remove the white background from an animated .gif, but this keeps happening:

Image

Any ideas?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: imagemagick crashing on me

Post by fmw42 »

You need to give us more information. What is your version of IM and platform (I presume windows)? If you are running from the command line, then ImageMagick Studio should not be involved. I am not a Windows user, so you may need help from some one who knows more about Windows.

Can you make a single gif image (not animation) into transparency using the same command you show? You may need to coalesce the frames of the gif, process them as above and then reconstitute your animation.

Code: Select all

convert 0.gif -coalesce -transparent white -layers optimize output.gif
Also see
http://www.imagemagick.org/Usage/anim_opt/#opt_trans
wriggles
Posts: 3
Joined: 2015-07-19T18:46:05-07:00
Authentication code: 1151

Re: imagemagick crashing on me

Post by wriggles »

fmw42 wrote:You need to give us more information. What is your version of IM and platform (I presume windows)? If you are running from the command line, then ImageMagick Studio should not be involved. I am not a Windows user, so you may need help from some one who knows more about Windows.

Can you make a single gif image (not animation) into transparency using the same command you show? You may need to coalesce the frames of the gif, process them as above and then reconstitute your animation.

Code: Select all

convert 0.gif -coalesce -transparent white -layers optimize output.gif
Also see
http://www.imagemagick.org/Usage/anim_opt/#opt_trans
Hey thanks for helping =)

I'll need to research what coalesce is, but I ended up with this after using that script:
Image
For now at least it isn't crashing =P

I'm using windows 7, and I downloaded IM about two weeks ago, so it should be the most recent version?
fmw42 wrote: If you are running from the command line, then ImageMagick Studio should not be involved.
Is there any other way to run it? I haven't seen any imagemagick interfaces so I assumed everyone just used the command line =O
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: imagemagick crashing on me

Post by fmw42 »

It is your frame disposal. Try adding -dispose previous. And perhaps your should also try adding -layers optimize.

See
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_basics/#dispose
http://www.imagemagick.org/Usage/anim_basics/#coalesce
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/

try

Code: Select all

convert 0.gif -coalesce -transparent white -dispose previous -layers optimize output.gif
What is your exact version of IM?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: imagemagick crashing on me

Post by dlemstra »

And you probably want to upgrade to the latest version. I think you have installed the version that has a bug in the gif writer.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
wriggles
Posts: 3
Joined: 2015-07-19T18:46:05-07:00
Authentication code: 1151

Re: imagemagick crashing on me

Post by wriggles »

dlemstra wrote:And you probably want to upgrade to the latest version. I think you have installed the version that has a bug in the gif writer.
fmw42 wrote: What is your exact version of IM?
woah I just needed to update :lol:
I guess I picked a bad date to start using Imagemagick.

No more crashes =) thanks again
Image
Post Reply