Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Implement a resize for animated gif.

$
0
0
You will get better results if you use the code below. Normally a frame has optimizations that causes it to contain only the changes to the previous image. The call to Coalesce will remove the optimization and change the image to how it looks at that point during the animation. You can find a good explanation here: http://www.imagemagick.org/Usage/anim_basics/#coalesce
using (MagickImageCollection collection = new MagickImageCollection("myPath"))
{
  collection.Coalesce();

  foreach(MagickImage image in collection)
  {
    image.Resize(62, 62);
  }
  
  collection.Write("myPath");
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles