{"id":1434,"url":"https://github.com/swiftgif/SwiftGif","last_synced_at":"2025-08-02T04:31:07.435Z","repository":{"id":17808924,"uuid":"20698873","full_name":"swiftgif/SwiftGif","owner":"swiftgif","description":"[UNMAINTAINED] 🌠 A small UIImage extension with gif support","archived":true,"fork":false,"pushed_at":"2021-01-14T09:18:22.000Z","size":3999,"stargazers_count":1326,"open_issues_count":33,"forks_count":310,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-07-27T19:55:00.546Z","etag":null,"topics":["gif","gif-support","ios","macos","swift","uiimage","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftgif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-10T19:37:12.000Z","updated_at":"2025-07-08T21:31:51.000Z","dependencies_parsed_at":"2022-08-26T10:11:15.570Z","dependency_job_id":null,"html_url":"https://github.com/swiftgif/SwiftGif","commit_stats":null,"previous_names":["bahlo/swiftgif"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/swiftgif/SwiftGif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftgif%2FSwiftGif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftgif%2FSwiftGif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftgif%2FSwiftGif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftgif%2FSwiftGif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftgif","download_url":"https://codeload.github.com/swiftgif/SwiftGif/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftgif%2FSwiftGif/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268067693,"owners_count":24190407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gif","gif-support","ios","macos","swift","uiimage","xcode"],"created_at":"2024-01-05T20:15:46.386Z","updated_at":"2025-08-02T04:31:06.890Z","avatar_url":"https://github.com/swiftgif.png","language":"Swift","funding_links":[],"categories":["Media","Libs","Images [🔝](#readme)"],"sub_categories":["GIF","Images","Other free courses"],"readme":"### :warning: UNMAINTAINED :warning:\n\nThis library is no longer maintained. I recommend using [Gifu](https://github.com/kaishin/gifu) instead.\n\n---\n\n# SwiftGif [![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/SwiftGifOrigin.svg)](http://cocoadocs.org/docsets/SwiftGifOrigin) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/bahlo/SwiftGif.svg?branch=master)](https://travis-ci.org/bahlo/SwiftGif)\n\nA small `UIImage` extension with gif support.\n\n![Demo gif](demo.gif)\n\n## Usage\n\n```swift\nimport SwiftGifOrigin\n\n// An animated UIImage\nlet jeremyGif = UIImage.gif(name: \"jeremy\")\n\n// A UIImageView with async loading\nlet imageView = UIImageView()\nimageView.loadGif(name: \"jeremy\")\n\n// A UIImageView with async loading from asset catalog(from iOS9)\nlet imageView = UIImageView()\nimageView.loadGif(asset: \"jeremy\")\n```\n\n## Installation\n### CocoaPods\nInstall [CocoaPods](http://cocoapods.org) with the following command:\n\n```bash\ngem install cocoapods\n```\n\nIntegrate SwiftGif into your Xcode project by creating a `Podfile`:\n\n```ruby\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'SwiftGifOrigin', '~\u003e 1.7.0'\nend\n```\n\nRun `pod install` to build your dependencies.\n\n### Carthage\n\nInstall [Carthage](https://github.com/Carthage/Carthage) with\n[Homebrew](http://brew.sh/) using the following command:\n\n```bash\nbrew update\nbrew install carthage\n```\n\nAdd the following line to your `Cartfile` to add SwiftGif:\n\n```ogdl\ngithub \"bahlo/SwiftGif\" ~\u003e 1.7.0\n```\n\nRun `carthage update` to build the framework and drag the built\n`SwiftGif.framework` into your Xcode project.\n\n\n## How does it work?\nEasy, it does the following:\n\n1. Find out the duration of every frame\n2. Find the greatest common divisor\n3. Add frames accordingly to the greatest common divisor to an array\n4. Create an animated UIImage with the frames\n\n## Testing\n\n```\n$ xcodebuild \\\n  -project SwiftGif.xcodeproj \\\n  -scheme SwiftGif \\\n  -sdk iphonesimulator \\\n  -destination \"platform=iOS Simulator,name=iPhone 8\" \\\n  build test \\\n  CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=\"\"\n```\n\n# Inspiration\nThis project is heavily inspired by [uiimage-from-animated-gif](https://github.com/mayoff/uiimage-from-animated-gif).\nKudos to [@mayoff](https://github.com/mayoff). :thumbsup:\n\n## License\nThis repository is licensed under the MIT license, more under\n[LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftgif%2FSwiftGif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftgif%2FSwiftGif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftgif%2FSwiftGif/lists"}