Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Unassigned: Animated gif generating [1378]

$
0
0
I can't really understand, why gif animation isn't working without this?
```
//Optionally reduce colors
QuantizeSettings settings = new QuantizeSettings { Colors = 256 };
collection.Quantize(settings);

// Optionally optimize the images (images should have the same size).
collection.Optimize();
```
2 png frames, same size. Without code above it creates gif with only 1 frame. With code above, everything is fine. Is it a bug of reature?
Comments: Is it possible to attach two of the pngBitmap files so I can reproduce this better? I get a correct image with the code below that is a simplified version of your code. ```C# byte[] bytes; using (var collection = new MagickImageCollection()) { foreach (var color in new MagickColor[] { MagickColors.Red, MagickColors.Green }) { var img = new MagickImage(color, 100, 100) { AnimationDelay = 100, HasAlpha = true }; collection.Add(img); } using (var str = new MemoryStream()) { collection.Write(str, MagickFormat.Gif); bytes = str.ToArray(); } File.WriteAllBytes(@"c:\test.gif", bytes); } ```

Viewing all articles
Browse latest Browse all 1011

Trending Articles



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