Image .gif frame timing off-by-one error in iOS #44608
Labels
Component: Image
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Platform: iOS
iOS applications.
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
When using the Image component to render a .gif file with non-uniform frame timings, the frame durations are shifted one frame on iOS.
On web and Android, the timings are correct, but iOS is incorrect.
A snack with this gif is provided:
![timing](https://private-user-images.githubusercontent.com/5315418/331875859-72b86f88-8258-4542-a298-b466396b5459.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyNzAyOTIsIm5iZiI6MTcxODI2OTk5MiwicGF0aCI6Ii81MzE1NDE4LzMzMTg3NTg1OS03MmI4NmY4OC04MjU4LTQ1NDItYTI5OC1iNDY2Mzk2YjU0NTkuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTNUMDkxMzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODc5MmY0YjFmZDMzMWExMjdiMGY5N2QwNDk3NTkxZjIyNWY1ODU1MTliZTJiZWJkMjRiYzBhNmQ1ZTc0OWQ3ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.WqowHASczFf7rNKHWgS1FXUKvKxG7B_AXmdgv5g_PPI)
The content of the image is pretty self explanatory. It consists of 6 frames with different duration, as shown in the image:
On web and Android, the gif is shown as expected, however on iOS, this is perceived:
The issue shows both in the snack as on physical devices.
Steps to reproduce
Use an Image with a non-uniformly timed .gif. See snack for repro.
React Native Version
0.74.0
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@joepb/gif-timing-error
Screenshots and Videos
Timing on Android: (correct)
![Gif timing android](https://private-user-images.githubusercontent.com/5315418/331876711-012c0a86-0f05-497f-82e1-9ddb3117a605.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyNzAyOTIsIm5iZiI6MTcxODI2OTk5MiwicGF0aCI6Ii81MzE1NDE4LzMzMTg3NjcxMS0wMTJjMGE4Ni0wZjA1LTQ5N2YtODJlMS05ZGRiMzExN2E2MDUuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTNUMDkxMzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmJjZWQ4ZTFiYWJiYzc4NDM5ZDI4MzdhMTMyNjY3MTBiYjM2ZmZjZDIzYzMwNmE4Y2JkN2ZiZGFmOGJhYTk0MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.AqiqU3wzCkYaW_OXDh8eenf2lDjDwt0iiLXlf0TEfd0)
Timing on iOS: (incorrect)
![Gif timing ios](https://private-user-images.githubusercontent.com/5315418/331876726-1d43b0fe-642b-4840-869e-bc4233730d68.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyNzAyOTIsIm5iZiI6MTcxODI2OTk5MiwicGF0aCI6Ii81MzE1NDE4LzMzMTg3NjcyNi0xZDQzYjBmZS02NDJiLTQ4NDAtODY5ZS1iYzQyMzM3MzBkNjguZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTNUMDkxMzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTIxZDAyMmNlZGVlNmY1ZjFkYWY2YWUxMjliNGI5YjE5MDEzNGQzN2FkM2I5OGE0OTUyYzQ2NmQ3ODhkNWRiNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jbEUInDMKEp34g2NQuQfOx90_4JJdMdyAfLcbRYjl7U)
The text was updated successfully, but these errors were encountered: