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

New Post: Is it possible to create tiled GIF images with Magick.NET?

$
0
0
Hm, only MagickImage has the AnimationIterations property right? I am setting it like this but it doesnt seem to work
using (MagickImageCollection collection = new MagickImageCollection())
{
    for (int a = 0; a < subImages.Count; a++)
    {
        //fullBmp are sized 128x128 but only a 8x8 square within it is actualy colored everything else is a single color which gets coded as transparent
        MagickImage mi = new MagickImage(subImages[a].fullBmp);
        mi.GifDisposeMethod = GifDisposeMethod.None;
        mi.Opaque(new MagickColor(subImages[a].transparent), MagickColor.Transparent);
        mi.AnimationIterations = 1;
        mi.AnimationDelay = 1;
        collection.Add(mi);
    }

    collection.Coalesce();
    collection.Optimize();
    collection.Write("output.gif");        
}
Do i need to set it somewhere else?

Also if i try to explain the second solution again, the goal essentialy is to show every frame of the gif (http://i.imgur.com/Gyjs3G4.gif) at once without any animation between the frames. The gif format can accomplish this with multiple tiles inside a single frame, but as i said again i dont know if thats possible to do in magick.net

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>