Unverified Commit 1b4e2a57 authored by Nikolas's avatar Nikolas Committed by GitHub
Browse files

fix get frames sample (#190)

parent f79a882f
......@@ -107,7 +107,11 @@ namespace PreviewThumbnailExtractor
using (var image = new Image<SixLabors.ImageSharp.PixelFormats.Bgra32>((int)(Pitch / BytePerPixel), (int)Lines))
using (var sourceStream = file.file.CreateViewStream())
{
sourceStream.Read(MemoryMarshal.AsBytes(image.GetPixelMemoryGroup().Single().Span));
var mg = image.GetPixelMemoryGroup();
for(int i = 0; i < mg.Count; i++)
{
sourceStream.Read(MemoryMarshal.AsBytes(mg[i].Span));
}
Console.WriteLine($"Writing {frameNumber:0000}.jpg");
var fileName = Path.Combine(destination, $"{frameNumber:0000}.jpg");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment