Imagesharp: GIF Repeatcount is lost when loading a gif

Created on 29 Jan 2020  路  7Comments  路  Source: SixLabors/ImageSharp

Prerequisites

  • [x] I have written a descriptive issue title
  • [x] I have verified that I am running the latest version of ImageSharp
  • [x] I have verified if the problem exist in both DEBUG and RELEASE mode
  • [x] I have searched open and closed issues to ensure it has not already been reported

Description
When loading a GIF which repeats all its frames only once (RepeatCount = 1), we noticed the RepeatCount in the GifMetaData is always set to 0 after loading the image via SixLabors.ImageSharp.Image.Load:
image
In this case, a RepeatCount of 0 implies to repeat indefinitly.

This breaks the resized gif, as the resized gif will loop indefnitetly, while the input gif only looped once. Attached input gif to simulate this behaviour:

Steps to Reproduce
Load provided GIF via Image.Load
input

The code which loads the file:
image

System Configuration
ImageSharp version: 1.0.0-beta0007
Other ImageSharp packages and versions: /
Environment (Operating system, version and so on): Win10 Pro, VS2019
.NET Framework version: 3.1.100
Additional information:

bug gif

All 7 comments

@bds8510 Can you please use the provided issue template.

@JimBobSquarePants done

Thanks. We might have already fixed this in the nightlies but I'll have a look tomorrow.

Sounds promising!
Thanks for the quick feedback.

Fixed in the latest nightlies.

@JimBobSquarePants , ok, thank you for the feedback!

Will this fix be included in the next prerelease (1.0.0-beta0008)?
Also, when is the ETA of this prerelease?

There won't be a beta0008 release. The next release is RC1 which I have scheduled hopefully for the beginning of March.

For now I recommend grabbing a nightly build from our MyGet feed.

Those releases are actually super stable (despite saying unstable in the name) and go through the same rigorous testing as the betas. They're much closer to the final API also.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xakep139 picture xakep139  路  3Comments

marcpabst picture marcpabst  路  3Comments

nullpainter picture nullpainter  路  3Comments

jarroda picture jarroda  路  3Comments

agoretsky picture agoretsky  路  4Comments