Browse Source
Merge pull request #2637 from SixLabors/backport/webp-milliseconds
Backport: Fix WebP animation speed bug
pull/2673/head
v3.1.2
James Jackson-South
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/ImageSharp/Formats/Webp/WebpFrameMetadata.cs
|
|
|
@ -48,7 +48,7 @@ public class WebpFrameMetadata : IDeepCloneable |
|
|
|
internal static WebpFrameMetadata FromAnimatedMetadata(AnimatedImageFrameMetadata metadata) |
|
|
|
=> new() |
|
|
|
{ |
|
|
|
FrameDelay = (uint)metadata.Duration.Milliseconds, |
|
|
|
FrameDelay = (uint)metadata.Duration.TotalMilliseconds, |
|
|
|
BlendMethod = metadata.BlendMode == FrameBlendMode.Source ? WebpBlendMethod.Source : WebpBlendMethod.Over, |
|
|
|
DisposalMethod = metadata.DisposalMode == FrameDisposalMode.RestoreToBackground ? WebpDisposalMethod.RestoreToBackground : WebpDisposalMethod.DoNotDispose |
|
|
|
}; |
|
|
|
|