It'd be nice to have `IImageEncoder` also have the overload ```C# void Encode<TPixel>(ImageBase<TPixel> imageBase, Stream stream) where TPixel : struct, IPixel<TPixel> ``` That way, you can directly save frames of an image as separate images without having to clone them as you have to now: ```C# var img = Image.Load(source); foreach (var frame in img.Frames.Select((f, i) => (f, i))) { var frameImg = new Image<Rgba32>(frame.Item1); var outputFile = File.Create($"frames/{frame.Item2}.png"); frameImg.SaveAsPng(outputFile); } ```
Activity
JimBobSquarePants commentedon Oct 3, 2017
Your wish is granted! 😄
The latest builds on MyGet now allow exporting of frames
antonfirsov commentedon Oct 3, 2017
@JimBobSquarePants what does
.Select((f, i) => (f, i))do in your sample code? Or is it just a typo?JimBobSquarePants commentedon Oct 3, 2017
I just copy/pasted the surrounding code above to be honest. It doesn't do anything now I look at it. I'll update.