High performance GIF engine

Related tags

Image SwiftyGif
Overview

Language CocoaPods Compatible Carthage compatible Build Status Pod License

SwiftyGif

High performance & easy to use Gif engine


Features

  • UIImage and UIImageView extension based
  • Remote GIFs with customizable loader
  • Great CPU/Memory performances
  • Control playback
  • Allow control of display quality by using 'levelOfIntegrity'
  • Allow control CPU/memory tradeoff via 'memoryLimit'

Installation

With CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'SwiftyGif'

With Carthage

Follow the usual Carthage instructions on how to add a framework to an application. When adding SwiftyGif among the frameworks listed in Cartfile, apply its syntax for GitHub repositories:

github "kirualex/SwiftyGif"

With Swift Package Manager

https://github.com/kirualex/SwiftyGif.git

How to Use

Project files

As of now, Xcode xcassets folders do not recognize .gif as images. This means you need to put your .gif oustide of the assets. I recommend creating a group gif for instance.

Quick Start

SwiftyGif uses familiar UIImage and UIImageView to display gifs.

Programmaticaly

import SwiftyGif

do {
    let gif = try UIImage(gifName: "MyImage.gif")
    let imageview = UIImageView(gifImage: gif, loopCount: 3) // Will loop 3 times
    imageview.frame = view.bounds
    view.addSubview(imageview)
} catch {
    print(error)
}

Directly from nib/storyboard

@IBOutlet var myImageView : UIImageView!
...

let gif = try UIImage(gifName: "MyImage.gif")
self.myImageView.setGifImage(gif, loopCount: -1) // Will loop forever

Remote GIFs

// You can also set it with an URL pointing to your gif
let url = URL(string: "...")
let loader = UIActivityIndicatorView(style: .white)
cell.gifImageView.setGifFromURL(url, customLoader: loader)

Performances

A SwiftyGifManager can hold one or several UIImageView using the same memory pool. This allows you to tune the memory limits to you convenience. If no manager is declared, SwiftyGif will just use the SwiftyGifManager.defaultManager.

Level of integrity

Setting a lower level of integrity will allow for frame skipping, lowering both CPU and memory usage. This can be a good option if you need to preview a lot of gifs at the same time.

do {
    let gif = try UIImage(gifName: "MyImage.gif", levelOfIntegrity:0.5)
} catch {
    print(error)
}

Controls

SwiftyGif offer various controls on the current UIImageView playing your gif file.

self.myImageView.startAnimatingGif()
self.myImageView.stopAnimatingGif()
self.myImageView.showFrameAtIndexDelta(delta: Int)
self.myImageView.showFrameAtIndex(index: Int)

To allow easy use of those controls, some utility methods are provided :

self.myImageView.isAnimatingGif() // Returns wether the gif is currently playing
self.myImageView.gifImage!.framesCount() // Returns number of frames for this gif

Delegate

You can declare a SwiftyGifDelegate to receive updates on the gif lifecycle. For instance, if you want your controller MyController to act as the delegate:

override func viewDidLoad() {
        super.viewDidLoad()
        self.imageView.delegate = self
}

Then simply add an extension:

extension MyController : SwiftyGifDelegate {

    func gifURLDidFinish(sender: UIImageView) {
        print("gifURLDidFinish")
    }

    func gifURLDidFail(sender: UIImageView) {
        print("gifURLDidFail")
    }

    func gifDidStart(sender: UIImageView) {
        print("gifDidStart")
    }
    
    func gifDidLoop(sender: UIImageView) {
        print("gifDidLoop")
    }
    
    func gifDidStop(sender: UIImageView) {
        print("gifDidStop")
    }
}

Benchmark

Display 1 Image

CPU Usage(average) Memory Usage(average)
FLAnimatedImage 35% 9,5Mb
SwiftyGif 2% 18,4Mb
SwiftyGif(memoryLimit:10) 34% 9,5Mb

Display 6 Images

CPU Usage(average) Memory Usage(average)
FLAnimatedImage 65% 25,1Mb
SwiftyGif 22% 105Mb
SwiftyGif(memoryLimit:20) 45% 26Mb

Measured on an iPhone 6S, iOS 9.3.1 and Xcode 7.3.

Comments
  • Crash: on deleteImageView(imageView: UIImageView)

    Crash: on deleteImageView(imageView: UIImageView)

    the library crashes from time to time (not consistant) on

        public func deleteImageView(imageView: UIImageView){
            if let index = self.displayViews.indexOf(imageView) {
                    self.displayViews.removeAtIndex(index)
                    self.totalGifSize -= imageView.gifImage!.imageSize!
                    if self.totalGifSize < memoryLimit && !self.haveCache {
                        self.haveCache = true
                        for imageView in self.displayViews{
                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH,0)){
                                imageView.updateCache()
                            }
                        }
                    }
            }
        }
    

    on self.displayViews.removeAtIndex(index) line.

    The case: displaying a gif when my app starts, and after login, i remove the screen with the gif form memory, althuogh i dont do any special handling of the SwiftyGif manager Should i remove the gif when im done using it or reset the manager? what am i missing here?

    thanks.

    bug 
    opened by karadis 20
  • Gif appears only one time

    Gif appears only one time

    I use SwiftyGif to play a gif image using this code: do { shoppieImage.setGifImage(try UIImage(gifName: "gif_coin_flip"), manager: gifManager, loopCount: -1) } catch let error { print(error) }

    The above code worked perfectly until I updated SwiftyGif to v5.0.1 The gif appears correctly but when I dismiss the view controller and present it again the gif does not appear

    opened by minaMagedNaeem 9
  • Cannot replay Gif animation from beginning

    Cannot replay Gif animation from beginning

    Steps to reproduce

    1. create UIImage with UIImage(gifName:) from a local GIF file bundled in project
    2. create UIImageView and set GIF with imageView.setGifImage(gifImage, manager: SwiftyGifManager.defaultManager, loopCount: 1)
    3. play GIF animation once with imageView.startAnimatingGif()
    4. wait until animation completes
    5. force playing GIF animation once again with:
    imageView.showFrameAtIndex(0)
    imageView.startAnimatingGif()
    

    Expected result

    • GIF starts playing back again from first frame

    Actual result

    • GIF moves back to first frame, but stays stopped

    We also tried adding an updateCurrentImage() call, with no luck.

    What are we doing wrong?

    Environment

    • SwiftyGif version: 4.2.0
    • Xcode: 10.1 (10B61)
    opened by BrainCrumbz 9
  • CPU usage spikes when app enters background and then opens again

    CPU usage spikes when app enters background and then opens again

    As the title says, if you press the home button to close the app and then reopen it, the CPU % spikes by a lot. Even the demo project does this. Not sure where the issue originates but would love to know if there's a way to fix it!!

    bug help wanted 
    opened by dlush315 8
  • Gif animations play at different speeds on iPad vs iPhone

    Gif animations play at different speeds on iPad vs iPhone

    Hello all,

    I've been loving SwiftyGif so far. When we implemented it, we noticed gif animations are playing at different speeds on iPad vs iPhone. Here's a few videos to showcase what I mean:

    iPad: https://trello-attachments.s3.amazonaws.com/5d8d55c6edf1901a536c38c8/5dc185b8b25a342a77c24f2e/4e2fd05eb07a1254ec5ed1179648e0b1/ipad-gifplayback.mp4

    iPhone: https://trello-attachments.s3.amazonaws.com/5d8d55c6edf1901a536c38c8/5dc185b8b25a342a77c24f2e/029961d6a5990c416ee0b79830e511a3/iPhone_gif_playback.mp4

    Any ideas about how to fix this?

    opened by RoboWorldEnt 6
  • bitcode_strip error with Carthage and Generic iOS Device build

    bitcode_strip error with Carthage and Generic iOS Device build

    Hi there

    we've been working with SwiftyGif in a custom framework of us for some time, always through the simulator. But now we're facing an issue when trying to build for Generic iOS Device.

    Our framework depends on SwiftyGif through Carthage. I understand that Carthage is not officially mentioned on readme, but until now it was going fine.

    Here below are the steps to reproduce, to be used with a (really) minimal repro workspace at SwiftyGif-BitcodeIssue.

    Does anyone have an idea why this happen? If that can help, we could contribute with a PR in order to solve the issue.

    Description

    • Issue shows up at build time.

    • Issue does not show up when building for a simulated device. It shows with Generic iOS Device instead.

    • Issue shows up even if no SwiftyGif code is exercised at all. It's enough to add framework to link binary phase. When framework is removed from linked binaries list, issue goes away.

    Steps to reproduce

    1. Open workspace in Xcode
    2. Make sure My App schema is selected, as well as Generic iOS Device
    3. Build product

    Expected result

    Product builds fine, with no errors.

    Actual result

    Product build fails. App reports following error from bitcode_strip: string table not at the end of the file (can't be processed) in file. Here's the full output (derived data and toolchain directories omitted for brevity):

    PBXCp ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework ...derivedData/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/MyLib.framework (in target: MyApp) cd /Users/braincrumbz/Documents/Projects/Lab/Swift/BitcodeIssue/MyApp builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -exclude Headers -exclude PrivateHeaders -exclude Modules -exclude *.tbd -bitcode-strip replace-with-marker -bitcode-strip-tool ...toolchain/bitcode_strip -resolve-src-symlinks ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework ...derivedData/Build/Products/Debug-iphoneos/MyApp.app/Frameworks

    ...toolchain/bitcode_strip ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework/MyLib -m -o ...derivedData/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/MyLib.framework/MyLib ...toolchain/bitcode_strip ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework/SwiftyGif.framework.dSYM/Contents/Resources/DWARF/SwiftyGif -m -o ...derivedData/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/MyLib.framework/SwiftyGif.framework.dSYM/Contents/Resources/DWARF/SwiftyGif ...toolchain/bitcode_strip: string table not at the end of the file (can't be processed) in file: ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework/SwiftyGif.framework.dSYM/Contents/Resources/DWARF/SwiftyGif (for architecture i386)error: bitcode_strip ...derivedData/Build/Products/Debug-iphoneos/MyLib.framework/SwiftyGif.framework.dSYM/Contents/Resources/DWARF/SwiftyGif: ...toolchain/bitcode_strip exited with 1

    opened by GiuseppePiscopo 6
  • Delegate gifDidStop not called

    Delegate gifDidStop not called

    I try to using delegate for imageView but only gifDidStop method delegate not called. Below is my code.

    func createSplashGif() { let gifImage = UIImage(gifName: "myVid_Splash") let gifMyvid = SwiftyGifManager(memoryLimit:20) self.splashImageView.delegate = self self.splashImageView.setGifImage(gifImage, manager: gifMyvid, loopCount: 1) }

    extension MVSplashViewController: SwiftyGifDelegate { func gifDidStop() { print("Did Stop") // Not calling } }

    Thanks.

    opened by lucio1392 6
  • 'shared' is unavailable: Use view controller based solutions where appropriate instead. On public func isDisplayedInScreen

    'shared' is unavailable: Use view controller based solutions where appropriate instead. On public func isDisplayedInScreen

    Hello,

    I am getting the following error when load the library into my project:

    Only happens when building an extension, any ideas?

    ../UIImageView+SwiftyGif.swift:262:71: 'shared' is unavailable: Use view controller based solutions where appropriate instead.

    
    public func isDisplayedInScreen(_ imageView:UIView?) ->Bool{
            if (self.isHidden) {
                return false
            }
            
          let screenRect = UIScreen.main.bounds
            let viewRect = imageView!.convert(self.frame,to:UIApplication.shared.keyWindow)
            
            let intersectionRect = viewRect.intersection(screenRect);
            if (intersectionRect.isEmpty || intersectionRect.isNull) {
                return false
            }
            return (self.window != nil)
    }
    
    opened by danieladarve 6
  • Issues with M1 ipad Pro with playback speed

    Issues with M1 ipad Pro with playback speed

    Hi,

    I am having gif play back issues on the ipad pro with the M1 chip only. The weirdest thing is that it was working before and stopped working after updating to version 5.4.3. I am pretty sure this has to do with the pro motion display.

    The gif is played much faster than on other devices.

    To be precise, in all my devices the gifs are run at 20fps (which is what I need), on the ipad pro it is much faster. Is there a way I can force the playback speed to be 20fps?

    This is how it's implemented:

    func setupAnimation(gifName: String) {
        do {
            let gif = try UIImage(gifName: gifName + ".gif", levelOfIntegrity: .highestNoFrameSkipping)
            imageView.setGifImage(gif, loopCount: 1)
        } catch {
            print(error)
        }
    }
    

    This is what I tried without success:

    1. keep level of integrity to default and .highestNoFrameSkipping
    opened by frank137 5
  • Pod is not taking the latest version

    Pod is not taking the latest version

    Hi, today I was trying to use SwiftyGif. after pod installation command, I am getting some error saying "The target “SwiftyGif” contains source code developed with Swift 2.x. This version of Xcode does not support building or migrating Swift 2.x targets."

    I found the below message from terminal

    "Installing SwiftyGif (4.2.0)" instead of 5.1.1

    Can you please help me to use latest version of SwiftyGif

    opened by jfalexvijay 5
  • Crash: fatal error: Can't form Range with upperBound < lowerBound

    Crash: fatal error: Can't form Range with upperBound < lowerBound

    The breakpoint hits in UIImage+SwiftyGif.swift and the app crashes with the message Crash: fatal error: Can't form Range with upperBound < lowerBound

    I am trying to play a gif with 100 loops and memory limit 20. I've also included the gif file that caused the issue. It seems to be reproducable. image

    //caclulate the time when each frame should be displayed at(start at 0)
    for i in 1..<delays.count{ delays[i] += delays[i-1] }
    
    opened by IsaiahJTurner 5
  • Index out of range crash in calculateFrameDelay() line 254

    Index out of range crash in calculateFrameDelay() line 254

    SwiftyGif version 5.4.3 iPhone 14 iOS 15.6

    Till now all the crashes are on iPhone 14 devices devices only.

    Crash report: ` Incident Identifier: BE75000E-8488-4C30-A3BC-CED3D6598E9C Hardware Model: iPhone14,3 Process: testApp [69061] Path: /private/var/containers/Bundle/Application/EF1B2356-0F5D-4567-9D8A-3FE401C513EB/testApp.app/testApp Identifier: com.company.testApp Version: 1.1.0 (8) AppStoreTools: 13F100 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.company.testApp [2367]

    Date/Time: 2022-08-31 21:16:59.2087 +0300 Launch Time: 2022-08-31 21:16:56.9304 +0300 OS Version: iPhone OS 15.6 (19G71) Release Type: User Baseband Version: 1.70.01 Report Version: 104

    Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x00000001035b8528 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [69061]

    Triggered by Thread: 0

    Thread 0 name: Thread 0 Crashed: 0 testApp 0x00000001035b8528 Swift runtime failure: Index out of range + 0 (:0) 1 testApp 0x00000001035b8528 subscript.get + 0 (:0) 2 testApp 0x00000001035b8528 UIImage.calculateFrameDelay(:levelOfIntegrity:) + 2528 (UIImage+SwiftyGif.swift:254) 3 testApp 0x00000001035b81a4 UIImage.calculateFrameDelay(:levelOfIntegrity:) + 1628 (UIImage+SwiftyGif.swift:0) 4 testApp 0x00000001035b7468 setGifFromData + 12 (UIImage+SwiftyGif.swift:98) 5 testApp 0x00000001035b7468 UIImage.setGif(:levelOfIntegrity:) + 1120 (UIImage+SwiftyGif.swift:124) 6 testApp 0x00000001035b7694 UIImage.init(gifName:levelOfIntegrity:) + 84 (UIImage+SwiftyGif.swift:86) 7 testApp 0x0000000102fed0a4 UIGIFImageView.createGIF() + 460 (SwiftyGifView.swift:95) 8 testApp 0x0000000102feb948 UIGIFImageView.__allocating_init(name:loopCount:playGif:) + 464 (SwiftyGifView.swift:73) 9 testApp 0x0000000102feb440 SwiftyGifView.makeUIView(context:) + 744 (SwiftyGifView.swift:38) 10 testApp 0x0000000102feba64 protocol witness for UIViewRepresentable.makeUIView(context:) in conformance SwiftyGifView + 52 (:0) 11 SwiftUI 0x000000019913dd3c PlatformViewRepresentableAdaptor.makeViewProvider(context:) + 544 (UIViewRepresentable.swift:423) 12 SwiftUI 0x0000000199125bf4 protocol witness for PlatformViewRepresentable.makeViewProvider(context:) in conformance PlatformViewRepresentableAdaptor + 24 (:0) 13 SwiftUI 0x0000000199122698 closure #1 in closure #2 in closure #1 in PlatformViewChild.updateValue() + 356 (PlatformViewRepresentable.swift:460) 14 SwiftUI 0x000000019915f728 partial apply for closure #1 in closure #2 in closure #1 in PlatformViewChild.updateValue() + 72 (:0) 15 SwiftUI 0x000000019910a258 PlatformViewRepresentableValues.asCurrent(do:) + 148 (PlatformViewRepresentable.swift:322) 16 SwiftUI 0x00000001991136e8 closure #2 in closure #1 in PlatformViewChild.updateValue() + 188 (PlatformViewRepresentable.swift:458) 17 SwiftUI 0x00000001990baef8 closure #1 in PlatformViewChild.updateValue() + 2340 (PlatformViewRepresentable.swift:0) 18 SwiftUI 0x00000001990f1bd4 partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 32 (:0) 19 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 20 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 21 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 22 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 23 SwiftUI 0x00000001990eff54 AlignmentModifiedLayoutComputer.updateValue() + 72 (:0) 24 SwiftUI 0x0000000199118280 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 24 (:0) 25 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 26 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 27 AttributeGraph 0x00000001c3a4425c AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 392 (ag-graph.cc:1307) 28 AttributeGraph 0x00000001c3a45fd0 AGGraphGetInputValue + 272 (ag-graph-impl.h:46) 29 SwiftUI 0x00000001990c8788 LayoutProxy.layoutComputer.getter + 116 (LayoutComputer.swift:0) 30 SwiftUI 0x0000000199134b2c FrameLayout.spacing(in:child:) + 112 (FrameLayout.swift:0) 31 SwiftUI 0x00000001991c8328 protocol witness for UnaryLayout.spacing(in:child:) in conformance FrameLayout + 44 (:0) 32 SwiftUI 0x000000019912e6e4 UnaryLayoutEngine.spacing() + 212 (UnaryLayoutView.swift:250) 33 SwiftUI 0x00000001991035c8 LayoutComputer.EngineDelegate.spacing() + 52 (LayoutComputer.swift:167) 34 SwiftUI 0x00000001990a300c StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 420 (LayoutComputer.swift:36) 35 SwiftUI 0x000000019916aaec specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 268 (StackLayout.swift:406) 36 SwiftUI 0x0000000199426450 specialized closure #2 in HVStack.updateLayoutComputer(rule:layoutContext:children:) + 176 37 SwiftUI 0x000000019947686c specialized closure #2 in HVStack.updateLayoutComputer(rule:layoutContext:children:) + 60 38 SwiftUI 0x00000001994be7cc partial apply for specialized closure #2 in HVStack.updateLayoutComputer(rule:layoutContext:children:) + 52 39 SwiftUI 0x000000019923371c specialized static LayoutComputerDelegate.update(:maybeInPlace:create:) + 280 (LayoutComputer.swift:330) 40 SwiftUI 0x00000001992ee104 specialized StatefulRule<>.updateLayoutComputer(layout:environment:layoutComputers:) + 104 41 SwiftUI 0x0000000199145820 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 228 42 SwiftUI 0x000000019910bf7c partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 80 (:0) 43 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 44 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 45 AttributeGraph 0x00000001c3a4425c AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 392 (ag-graph.cc:1307) 46 AttributeGraph 0x00000001c3a45fd0 AGGraphGetInputValue + 272 (ag-graph-impl.h:46) 47 SwiftUI 0x00000001990c8788 LayoutProxy.layoutComputer.getter + 116 (LayoutComputer.swift:0) 48 SwiftUI 0x0000000199ce6a38 closure #1 in ZStackLayout.sizeThatFits(in:context:children:) + 32 (LayoutProxy.swift:92) 49 SwiftUI 0x0000000199ce67ec ZStackLayout.sizeThatFits(in:context:children:) + 280 (ZStack.swift:0) 50 SwiftUI 0x0000000199b29860 closure #1 in LayoutEngine.sizeThatFits(:) + 100 (LayoutAttribute.swift:59) 51 SwiftUI 0x0000000199b29724 LayoutEngine.sizeThatFits(:) + 392 (StandardLibraryAdditions.swift:545) 52 SwiftUI 0x0000000199b5cfec LayoutComputer.EngineDelegate.sizeThatFits(:) + 100 (LayoutComputer.swift:171) 53 SwiftUI 0x0000000199ce695c ZStackLayout.sizeThatFits(in:context:children:) + 648 (LayoutComputer.swift:53) 54 SwiftUI 0x0000000199b29860 closure #1 in LayoutEngine.sizeThatFits(:) + 100 (LayoutAttribute.swift:59) 55 SwiftUI 0x0000000199b29724 LayoutEngine.sizeThatFits(:) + 392 (StandardLibraryAdditions.swift:545) 56 SwiftUI 0x0000000199b5cfec LayoutComputer.EngineDelegate.sizeThatFits(:) + 100 (LayoutComputer.swift:171) 57 SwiftUI 0x00000001991832dc RootGeometry.value.getter + 272 (LayoutComputer.swift:53) 58 SwiftUI 0x00000001990e3db8 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 32 59 SwiftUI 0x0000000199091930 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 40 (:0) 60 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 61 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 62 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 63 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 64 SwiftUI 0x00000001990ed774 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 152 (:0) 65 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 66 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 67 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 68 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 69 SwiftUI 0x000000019913e9a4 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 164 (:0) 70 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 71 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 72 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 73 AttributeGraph 0x00000001c3a45fd0 AGGraphGetInputValue + 272 (ag-graph-impl.h:46) 74 SwiftUI 0x000000019914c8a4 PositionAwarePlacementContext.size.getter + 52 (:0) 75 SwiftUI 0x0000000199089bd0 SafeAreaInsets.resolve(regions:in:) + 80 (SafeAreaInsets.swift:161) 76 SwiftUI 0x00000001991c6108 PositionAwarePlacementContext.safeAreaInsets(matching:) + 164 (SafeAreaInsets.swift:243) 77 SwiftUI 0x0000000199220d9c SafeAreaRegionsIgnoringLayout.placement(of:in:) + 64 (SafeAreaIgnoringLayout.swift:50) 78 SwiftUI 0x00000001991be82c specialized UnaryPositionAwareChildGeometry.value.getter + 176 (SafeAreaIgnoringLayout.swift:18) 79 SwiftUI 0x00000001991900fc specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 44 80 SwiftUI 0x000000019911fbdc partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 40 (:0) 81 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 82 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 83 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 84 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 85 SwiftUI 0x00000001990cd200 specialized UnaryChildGeometry.parentSize.getter + 104 (:0) 86 SwiftUI 0x0000000199213614 specialized UnaryChildGeometry.value.getter + 120 (UnaryLayoutView.swift:194) 87 SwiftUI 0x00000001990e3db8 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 32 88 SwiftUI 0x0000000199284d8c partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 40 (:0) 89 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 90 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 91 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 92 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 93 SwiftUI 0x00000001991fbb8c specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 116 (:0) 94 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 95 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 96 AttributeGraph 0x00000001c3a442f8 AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 (ag-graph.cc:1331) 97 AttributeGraph 0x00000001c3a41e54 AGGraphGetValue + 240 (ag-graph-impl.h:46) 98 SwiftUI 0x000000019910e788 AnimatableFrameAttribute.updateValue() + 108 (:0) 99 SwiftUI 0x0000000199164028 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 24 (:0) 100 AttributeGraph 0x00000001c3a43b18 AG::Graph::UpdateStack::update() + 524 (ag-closure.h:109) 101 AttributeGraph 0x00000001c3a43508 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 396 (ag-graph-update.cc:734) 102 AttributeGraph 0x00000001c3a42318 AG::Subgraph::update(unsigned int) + 876 (ag-subgraph.cc:731) 103 SwiftUI 0x000000019905641c ViewGraph.updateOutputs() + 236 (GraphHost.swift:558) 104 SwiftUI 0x0000000199067ab0 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 2284 (ViewGraph.swift:566) 105 SwiftUI 0x000000019912f640 ViewRendererHost.render(interval:updateDisplayList:) + 388 (ViewRendererHost.swift:0) 106 SwiftUI 0x000000019907aa50 _UIHostingView.layoutSubviews() + 256 (UIHostingView.swift:1888) 107 SwiftUI 0x000000019907e8b0 @objc _UIHostingView.layoutSubviews() + 28 (:0) 108 UIKitCore 0x0000000193a2217c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2592 (UIView.m:18426) 109 QuartzCore 0x000000019519a7fc CA::Layer::layout_if_needed(CA::Transaction*) + 532 (CALayer.mm:10118) 110 QuartzCore 0x000000019518cc60 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136 (CALayer.mm:2480) 111 QuartzCore 0x00000001951a15b4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 452 (CAContextInternal.mm:2612) 112 QuartzCore 0x00000001951aa4a8 CA::Transaction::commit() + 704 (CATransactionInternal.mm:449) 113 QuartzCore 0x000000019518c3a0 CA::Transaction::flush_as_runloop_observer(bool) + 88 (CATransactionInternal.mm:956) 114 UIKitCore 0x0000000193dd46e0 _UIApplicationFlushCATransaction + 72 (UIApplication.m:0) 115 UIKitCore 0x000000019406ed5c UIUpdateSequenceRun + 84 (UIUpdateSequence.mm:112) 116 UIKitCore 0x00000001946f5edc schedulerStepScheduledMainSection + 144 (UIUpdateScheduler.m:778) 117 UIKitCore 0x00000001946f56a4 runloopSourceCallback + 92 (UIUpdateScheduler.m:870) 118 CoreFoundation 0x00000001914d3414 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 (CFRunLoop.c:1972) 119 CoreFoundation 0x00000001914e41a0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016) 120 CoreFoundation 0x000000019141d694 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053) 121 CoreFoundation 0x000000019142305c __CFRunLoopRun + 828 (CFRunLoop.c:2951) 122 CoreFoundation 0x0000000191436bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 123 GraphicsServices 0x00000001ad5a1374 GSEventRunModal + 164 (GSEvent.c:2200) 124 UIKitCore 0x0000000193daab58 -[UIApplication _run] + 1100 (UIApplication.m:3511) 125 UIKitCore 0x0000000193b2c090 UIApplicationMain + 364 (UIApplication.m:5064) 126 libswiftUIKit.dylib 0x00000001a91d7ecc UIApplicationMain(::::) + 104 (UIKit.swift:530) 127 testApp 0x0000000102fe43b0 static UIApplicationDelegate.main() + 104 (:0) 128 testApp 0x0000000102fe4338 static AppDelegate.$main() + 44 (:14) 129 testApp 0x0000000102fe4434 main + 28 (AppDelegate.swift:0) 130 dyld 0x0000000103abdda4 start + 520 (dyldMain.cpp:879)

    Thread 1: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 2: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 3: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001c90a64a0 mach_msg_trap + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001c90a6ae4 mach_msg + 76 (mach_msg.c:119) 2 CoreFoundation 0x000000019141ed30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646) 3 CoreFoundation 0x00000001914231bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000) 4 CoreFoundation 0x0000000191436bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 5 Foundation 0x0000000192c29444 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373) 6 Foundation 0x0000000192c6ae0c -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420) 7 UIKitCore 0x0000000193d24cc4 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167) 8 Foundation 0x0000000192c7941c NSThread__start + 808 (NSThread.m:972) 9 libsystem_pthread.dylib 0x0000000202e159ac _pthread_start + 148 (pthread.c:891) 10 libsystem_pthread.dylib 0x0000000202e14e68 thread_start + 8 (:-1)

    Thread 5: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 6: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 7 name: Thread 7: 0 libsystem_kernel.dylib 0x00000001c90a64a0 mach_msg_trap + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001c90a6ae4 mach_msg + 76 (mach_msg.c:119) 2 CoreFoundation 0x000000019141ed30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646) 3 CoreFoundation 0x00000001914231bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000) 4 CoreFoundation 0x0000000191436bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 5 CFNetwork 0x0000000191eb31dc +[__CFN_CoreSchedulingSetRunnable _run:] + 472 (CoreSchedulingSet.mm:1372) 6 Foundation 0x0000000192c7941c NSThread__start + 808 (NSThread.m:972) 7 libsystem_pthread.dylib 0x0000000202e159ac _pthread_start + 148 (pthread.c:891) 8 libsystem_pthread.dylib 0x0000000202e14e68 thread_start + 8 (:-1)

    Thread 8: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 9: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 10: 0 libsystem_pthread.dylib 0x0000000202e14e54 start_wqthread + 0 (:-1)

    Thread 0 crashed with ARM Thread State (64-bit): x0: 0x94a12e4f84d90eb5 x1: 0x0000000282d86b80 x2: 0x0000000282d86c38 x3: 0x0000000000000001 x4: 0xffffffffffff7a00 x5: 0x0000000000000020 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x00000002836b9980 x9: 0x000000000000000c x10: 0x0000000282d86c28 x11: 0x0000000281ab38c0 x12: 0x0000000000000007 x13: 0x0000000000000007 x14: 0x0000000000000018 x15: 0x0000000000000000 x16: 0x00000001962c4530 x17: 0xfffffffffffffffe x18: 0x0000000000000000 x19: 0x00000000000002c1 x20: 0x94a12e4f84d90eb5 x21: 0x0000000282a9ddd0 x22: 0x00000000df000001 x23: 0x0000000281ab38c0 x24: 0x000000000000000c x25: 0x0000000109046000 x26: 0x00000000000002c1 x27: 0x000000005f000000 x28: 0x0000000000000000 fp: 0x000000016ce2f630 lr: 0x00000001035b81a4 sp: 0x000000016ce2f520 pc: 0x00000001035b8528 cpsr: 0x60001000 esr: 0xf2000001 (Breakpoint) brk 1

    Binary Images: 0x102fc8000 - 0x10374bfff testApp arm64 <43f7d1ff20f23b7d8cd92759fcae4724> /private/var/containers/Bundle/Application/EF1B2356-0F5D-4567-9D8A-3FE401C513EB/testApp.app/testApp 0x103aa4000 - 0x103afbfff dyld arm64e <66e1fb2668f8379ba052eb8b8291b5e1> /usr/lib/dyld 0x191418000 - 0x19186dfff CoreFoundation arm64e <6b22dd8135853be6bc77ba19810ec0f2> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x191c3b000 - 0x1920fcfff CFNetwork arm64e <106410ffdd4f3527ad531980fe8b0ddd> /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x192c10000 - 0x192f1afff Foundation arm64e /System/Library/Frameworks/Foundation.framework/Foundation 0x193896000 - 0x195133fff UIKitCore arm64e <137a95aada6d332cbc01e13bb9b6e317> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore 0x19515a000 - 0x19546bfff QuartzCore arm64e /System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x199051000 - 0x19a0e8fff SwiftUI arm64e <6ab6407f39eb3fb393d55e0c55af3a2d> /System/Library/Frameworks/SwiftUI.framework/SwiftUI 0x1a91a7000 - 0x1a9214fff libswiftUIKit.dylib arm64e /usr/lib/swift/libswiftUIKit.dylib 0x1ad5a0000 - 0x1ad5a8fff GraphicsServices arm64e /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x1c3a40000 - 0x1c3a7afff AttributeGraph arm64e /System/Library/PrivateFrameworks/AttributeGraph.framework/AttributeGraph 0x1c90a5000 - 0x1c90dafff libsystem_kernel.dylib arm64e <9ab02ad0348c30cb99f40979c2d47515> /usr/lib/system/libsystem_kernel.dylib 0x202e14000 - 0x202e1ffff libsystem_pthread.dylib arm64e /usr/lib/system/libsystem_pthread.dylib

    EOF `

    help wanted 
    opened by khaledannajar 2
  • Issue on loading a png image after loading a gif image in same image view.

    Issue on loading a png image after loading a gif image in same image view.

    First I loaded a png image in my image view in my cell. then I loaded a gif file from server after that I tried to load same png. but it is showing the previous Gif image.

    opened by Minna 3
  • Memory leak associated with stopAnimatingGif()

    Memory leak associated with stopAnimatingGif()

    If I try to dealloc the view while calling stopAnimatingGif(), a memory leak occurs.

    There is a phenomenon in which memory is deallocated only when startAnimatingGif() is executed.

    What is the problem? Could it be related to the isPlaying property used internally?

    opened by JK0369 0
  • Crash in setGifFromURL

    Crash in setGifFromURL

    There is crash in setGifFromURL for a specific file. Attaching the file and crash log

    9608A67D-60FF-4F6F-8794-98800935D5FE

    Crash Stack trace

    CrashReporter Key: A0F70DAC-97B0-43DE-A479-E200E6E64FD0 Hardware Model: iPhone10,3 Process: [876] Path: /private/var/containers/Bundle/Application/BD01C460-BCA9-4DBD-AB7A-6C470221FE07/.app/ Identifier: com.App.stage.rewrite Version: 9.7.938 (97938) Code Type: arm64 Parent Process: [1]

    Date/Time: 2022-02-23T10:05:16.999Z Launch Time: 2022-02-23T10:05:05Z OS Version: iPhone OS 14.8 (18H17) Report Version: 104

    Exception Type: SIGSEGV Exception Codes: SEGV_MAPERR at 0xe000000010b92374 Crashed Thread: 0

    Thread 0 Crashed: 0 QuartzCore 0x00000001a50161b8 CA::Layer::retain_parent(CA::Transaction*) const + 56 1 QuartzCore 0x00000001a5026138 CALayerGetSuperlayer + 48 2 UIKitCore 0x00000001a4ba6a1c -[UIView(UIKitManual) superview] + 48 3 UIKitCore 0x00000001a4b88d30 -[UIView(Hierarchy) isDescendantOfView:] + 48 4 UIKitCore 0x00000001a3eb4a78 __52-[_UIPointerInteractionAssistant _assistantForView:]_block_invoke + 88 5 CoreFoundation 0x00000001a1d61e94 NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK + 12 6 CoreFoundation 0x00000001a1cde234 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 200 7 UIKitCore 0x00000001a3eb499c -[_UIPointerInteractionAssistant _assistantForView:] + 160 8 UIKitCore 0x00000001a3eb4ad0 -[_UIPointerInteractionAssistant _monitorsView:] + 20 9 CoreFoundation 0x00000001a1e04c80 __40-[NSSet objectsWithOptions:passingTest:]block_invoke + 28 10 CoreFoundation 0x00000001a1d427e8 NSSET_IS_CALLING_OUT_TO_A_BLOCK + 12 11 CoreFoundation 0x00000001a1d42a68 __NSSetEnumerate + 628 12 CoreFoundation 0x00000001a1cf4ea4 -[NSSet objectsWithOptions:passingTest:] + 192 13 UIKitCore 0x00000001a46f0418 -[UIWindow _subtreeMonitorsForView:] + 120 14 UIKitCore 0x00000001a4b85e68 -[UIView(Hierarchy) removeFromSuperview] + 64 15 SwiftyGif 0x0000000104d00500 partial apply forwarder for closure #1 () -> () in closure #1 (Foundation.Data?, __C.NSURLResponse?, Swift.Error?) -> () in (extension in SwiftyGif):__C.UIImageView.setGifFromURL(: Foundation.URL, manager: SwiftyGif.SwiftyGifManager, loopCount: Swift.Int, levelOfIntegrity: Swift.Float, session: __C.NSURLSession, showLoader: Swift.Bool, customLoader: __C.UIView?) -> __C.NSURLSessionDataTask? (UIImageView+SwiftyGif.swift:125) 16 SwiftyGif 0x0000000104cfd828 reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () (:0) 17 libdispatch.dylib 0x00000001a1a2e2b0 _dispatch_call_block_and_release + 20 18 libdispatch.dylib 0x00000001a1a2f298 _dispatch_client_callout + 12 19 libdispatch.dylib 0x00000001a1a11430 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 868 20 CoreFoundation 0x00000001a1d76998 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 8 21 CoreFoundation 0x00000001a1d70df8 __CFRunLoopRun + 2524 22 CoreFoundation 0x00000001a1d6fed0 CFRunLoopRunSpecific + 568 23 GraphicsServices 0x00000001b84b9570 GSEventRunModal + 156 24 UIKitCore 0x00000001a469d2d0 -[UIApplication _run] + 1048 25 UIKitCore 0x00000001a46a284c UIApplicationMain + 160

    opened by dheeraj-singh511 0
  • Crash on UIImage.calculateFrameDelay since 5.4.3

    Crash on UIImage.calculateFrameDelay since 5.4.3

    Hi, we upgrade the library to 5.4.3 recently and saw a new crash:

    Crashed: com.apple.main-thread
    EXC_BREAKPOINT 0x0000000102a95c3c
    
    Crashed: com.apple.main-thread
    0  UIImage.calculateFrameDelay(_:levelOfIntegrity:) + 4370750524 (<compiler-generated>:4370750524)
    1  specialized UIImage.init(gifData:levelOfIntegrity:) + 98 (UIImage+SwiftyGif.swift:98)
    2  UIImage.init(gifData:levelOfIntegrity:) + 4370745504 (<compiler-generated>:4370745504)
    

    Happens on both iOS 14 and iOS 15. Can't reproduce (only saw crash logs).

    Thanks!

    opened by ba01ei 0
  • Request: Benchmark against Gifu

    Request: Benchmark against Gifu

    Gifu is probably one of the most popular Swift-based GIF engines today. Would love to see how this library compares to it: https://github.com/kaishin/Gifu

    Thank you!

    opened by freak4pc 0
Releases(5.4.3)
  • 5.4.3(Feb 2, 2022)

  • 5.4.2(Dec 16, 2021)

  • 5.4.1(Nov 30, 2021)

    • Fix crash when gif loaded from url and delegate has been deallocate
    • Fix index out of range
    • Add library evolution support
    • Package.swift: adds dynamic library
    Source code(tar.gz)
    Source code(zip)
  • 5.4.0(Jan 29, 2021)

    • FIxed : Gif animations play at different speeds on iPad vs iPhone
    • FIxed : method "gifDidStop" will execute twice
    • Added : basic support for macOS
    • Changed : bump IPHONEOS_DEPLOYMENT_TARGET to 9.0 to remove warning
    • Changed : Removed big files from repo
    Source code(tar.gz)
    Source code(zip)
  • 5.3.0(May 20, 2020)

    • Updated setGifFromURL by adding parameter customLoader: UIView? = nil, allowing for custom loader UIView. A typical use would be something like :
    let loader = UIActivityIndicatorView.init(style: .white)
    self.imageView.setGifFromURL(url, customLoader: loader)
    
    • Updated setGifFromURL by adding parameter session: URLSession = URLSession.shared, allowing for custom URLSession.
    • Added a basic caching system for remote GIFs
    • Updated Demo project in order to demonstrate local GIFs and GIFs in a UITableView
    Source code(tar.gz)
    Source code(zip)
Owner
Alexis Creuzot
iOS developer, #ML #UX Cofounder @monoqle
Alexis Creuzot
Gifu adds protocol-based, performance-aware animated GIF support to UIKit.

Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a prefecture in Japan). Install Swift Package Manager Add the fo

Reda Lemeden 2.8k Jan 7, 2023
XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage

XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage. An illustration is shown below: Features Plays m

Khaled Taha 561 Sep 9, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and  Watch.

KFSwiftImageLoader KFSwiftImageLoader is an extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memor

Kiavash Faisali 343 Oct 29, 2022
A high-performance image library for downloading, caching, and processing images in Swift.

Features Asynchronous image downloader with priority queuing Advanced memory and database caching using YapDatabase (SQLite) Guarantee of only one ima

Yap Studios 72 Sep 19, 2022
A pure Swift high-performance asynchronous image loading framework. SwiftUI supported.

Longinus Longinus is a pure-Swift high-performance asynchronous web image loading,caching,editing framework. It was learned from Objective-C web image

Qitao Yang 290 Dec 17, 2022
A Swift implementation of fastimage. Supports PNG, GIF, and JPEG.

ImageScout ImageScout is a Swift implementation of fastimage. It allows you to find the size and type of a remote image by downloading as little as po

Reda Lemeden 967 Dec 30, 2022
SwiftGif - A small UIImage extension with gif support.

SwiftGif - A small UIImage extension with gif support.

SwiftGif 1.3k Dec 20, 2022
Drop in GIF Collection View. Uses Tenor as default GIFs provider.

Drop in GIF Collection View. Uses Tenor as default GIFs provider. This will allow you to easily integrate GIF image search into your app or you can use this as a GIF keyboard for your messaging needs.

null 5 May 7, 2022
DGImageView - Asynchronous image downloader with cache. Supports gif too

DGImageView Installation Usage DGImageView Asynchronous image downloader with cache. Supports gif, memory cache, disk cache features. Installation Xco

donggyu 1 Jan 1, 2022
An app show your Live Photo and export as GIF.

LivelyGIFs Show your Live Photo and export as GIF. Demo HighLights Do not use Pod or Cathage to install 3rd party library Simple logic, new learner fr

Xue Yu 95 Jun 24, 2022
A tool support convert image gif to gif3d

Trick convert gif to gif3d using Swift Features Simple way to convert gif to gif3d Change background Change size eraser tool How to work Add a layer w

Chuong Tran 16 Jan 4, 2023
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.

I've built out the Swift version of this library! Screenshots Description ABMediaView can display images, videos, as well as now GIFs and Audio! It su

Andrew Boryk 80 Dec 20, 2022
An early experimental general-purpose pattern matching engine for Swift.

Declarative String Processing for Swift An early experimental general-purpose pattern matching engine for Swift. See Declarative String Processing Ove

Apple 232 Jan 2, 2023
Patch out the GPU checks for any x86-64 macOS Unreal Engine-based game

UnrealGPUPatcher Download here Patch out the GPU checks for any x86-64 macOS Unreal Engine-based game, particularly ARK: Survival Evolved. Requirement

Jacob Greenfield 35 Jan 1, 2023
An implementation of High Pass Skin Smoothing using Apple's Core Image Framework

YUCIHighPassSkinSmoothing An implementation of High Pass Skin Smoothing using CoreImage.framework Available on both OS X and iOS. Ports A MetalPetal b

Yu Ao 1.2k Dec 17, 2022
High Quality Image ScrollView using cropped tiled images.

THTiledImageView Feature ?? THTiledImageView fully support UIScrollView. You can subclass it and use it. ?? Support Async Image Downloading & Caching.

null 28 Oct 28, 2022
SwiftyGif - High performance & easy to use Gif engine

SwiftyGif High performance & easy to use Gif engine Features UIImage and UIImageView extension based Remote GIFs with customizable loader Great CPU/Me

Alexis Creuzot 1.7k Jan 3, 2023
Imagine Engine - a fast, high performance Swift 2D game engine for Apple's platforms

Welcome to Imagine Engine, an ongoing project that aims to create a fast, high performance Swift 2D game engine for Apple's platforms that is also a j

John Sundell 1.8k Jan 3, 2023
An animated gif & apng engine for iOS in Swift. Have a great performance on memory and cpu usage.

Features Small but complete, only200lines of code. Allow to control display quality, memory usage, loop time and display progress. Have a great perfor

Jiawei Wang 1k Nov 9, 2022