alexiscreuzot / SwiftyGif

High performance GIF engine
MIT License
1.99k stars 210 forks source link

Crash on UIImage.calculateFrameDelay since 5.4.3 #174

Closed tac-han closed 1 year ago

tac-han commented 1 year ago

crash func: private func calculateFrameDelay(_ delaysArray: [Float], levelOfIntegrity: GifLevelOfIntegrity) crash code: displayRefreshFactor = displayRefreshFactors[I]

This function fixed displayRefreshFactors in 5.4.3. That you removed UIScreen.main.maximumFramesPerSecond in displayRefreshFactors. But it will be crash in iPhone 13 pro by ( index 12 beyond displayRefreshFactors ). I think iPhone 13 Pro need maximumFramesPerSecond(120) , that you need add it.