Skip to content

Commit dbb8960

Browse files
committed
encode FrameDuration
1 parent 6fed95b commit dbb8960

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ImageSharp/Formats/Webp/Lossless/Vp8LEncoder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ public void Encode<TPixel>(ImageFrame<TPixel> frame, Stream stream, bool hasAnim
307307
prevPosition = BitWriterBase.WriteAnimationFrame(stream, new()
308308
{
309309
Width = (uint)frame.Width,
310-
Height = (uint)frame.Height
310+
Height = (uint)frame.Height,
311+
Duration = frame.Metadata.GetWebpMetadata().FrameDuration
311312
});
312313
}
313314

src/ImageSharp/Formats/Webp/Lossy/Vp8Encoder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ private void Encode<TPixel>(ImageFrame<TPixel> frame, Stream stream, bool hasAni
477477
prevPosition = BitWriterBase.WriteAnimationFrame(stream, new()
478478
{
479479
Width = (uint)frame.Width,
480-
Height = (uint)frame.Height
480+
Height = (uint)frame.Height,
481+
Duration = frame.Metadata.GetWebpMetadata().FrameDuration
481482
});
482483
}
483484

0 commit comments

Comments
 (0)