Comments (5)
Ok, I fixed this in my fork. It was quite a simple issue, the refresh rates are hardcoded and assumed a max of 60FPS, but the 2021 MBPs and iPad Pros have a 120Hz screen.
from swiftygif.
Reverting to version 5.4.0 fixed my specific issue.
So I will keep using 5.4.0 for now.
from swiftygif.
macOS app running on macOS 13, M1 Pro. Same issue, GIFs rendering much faster than they should. I'll see if reverting fixes it.
from swiftygif.
No luck, after reverting to 5.4.0, cleaning build folder and rebuilding, the issue still persists. For more context, this is a SwiftUI app, but using a very similar snippet of code to instantiate SwiftyGIF.
from swiftygif.
This might be a regression caused by #165 when fixing #164. I had a quick look and can send a quick fix which solved the problem on my M1 iPad pro. But I found another problem at line 225 in UIImage+SwiftyGif
let maximumFramesPerSecond = UIScreen.main.maximumFramesPerSecond
This is problematic since this is 120 even when a high refresh rate device is in low power mode or when the system decides to throttle the framerate of the display. CADisplayLink and CVDisplayLink should be used to get the current refresh rate, however, this requires some refactoring as the code seems to assume the device is running at a fixed frame rate. More info here https://developer.apple.com/videos/play/wwdc2021/10147/
I'll send a quick fix to address OP's problem but this is a band aid solution to the problem. If there's interest in using display links, I can help. Cheers!
from swiftygif.
Related Issues (20)
- Issue on loading a png image after loading a gif image in same image view. HOT 3
- Crash on UIImage.calculateFrameDelay since 5.4.3
- Index out of range crash in calculateFrameDelay() line 254 HOT 5
- Load gif from app local cache HOT 1
- Crash on UIImage.delayTimes()
- option to disable giflog HOT 1
- Fatal error: Unexpectedly found nil while unwrapping an Optional value
- watchOS compatible HOT 1
- $sSo7UIImageC9SwiftyGifE19calculateFrameDelay33_9658D83D62B37A941BEC0DE7CE976670LL_16levelOfIntegrityySaySfG_SftF HOT 1
- convert the delegate design to support closure HOT 2
- Privacy manifest HOT 3
- Shadow-like artefact with outlines of first frame remains when showing subsequent frames. HOT 1
- Support App Privacy Manifests HOT 4
- Incomplete PrivacyInfo.xcprivacy
- Memory issue HOT 1
- Need to update swift-tools-version HOT 1
- Add a privacy manifest file
- MacOS/AppKit support? HOT 1
- SwiftyGif- Not control Animating Speed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftygif.