SwiftGif icon indicating copy to clipboard operation
SwiftGif copied to clipboard

crash when the gif only had single frame

Open sjdong opened this issue 8 years ago • 2 comments

func delayForImageAtIndex line 74: if delayObject.doubleValue == 0 { delayObject = unsafeBitCast(CFDictionaryGetValue(gifProperties, unsafeAddressOf(kCGImagePropertyGIFDelayTime)), AnyObject.self) } will cause the issues when there is only single frame

i'am newbie to swift, i add this code to fixed the issues. but i don't know whether this is a good way or not. if count == 1 { return UIImage(CGImage: CGImageSourceCreateImageAtIndex(source, 0, nil)!) }

sjdong avatar Apr 11 '16 07:04 sjdong

Hey, I'm sorry you're having problems - I will look into this :ok_hand:

bahlo avatar Apr 11 '16 09:04 bahlo

Im having this problem at the moment, where would I place that code to fix the issue?

thijsheijden avatar Sep 06 '18 15:09 thijsheijden