Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #55 from rokgregoric/master
Browse files Browse the repository at this point in the history
Allow frame delays lower then 0.1sec.
  • Loading branch information
bahlo committed Dec 27, 2018
2 parents c6ec0a1 + 98d06b7 commit e01d5df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SwiftGifCommon/UIImage+Gif.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ extension UIImage {
Unmanaged.passUnretained(kCGImagePropertyGIFDelayTime).toOpaque()), to: AnyObject.self)
}

delay = delayObject as? Double ?? 0

if delay < 0.1 {
if let delayObject = delayObject as? Double, delayObject > 0 {
delay = delayObject
} else {
delay = 0.1 // Make sure they're not too fast
}

Expand Down

0 comments on commit e01d5df

Please sign in to comment.