{"id":15481375,"url":"https://github.com/fwcd/swift-gif","last_synced_at":"2025-04-22T15:24:43.341Z","repository":{"id":98826712,"uuid":"299739259","full_name":"fwcd/swift-gif","owner":"fwcd","description":"Cross-platform GIF encoder and decoder for Swift","archived":false,"fork":false,"pushed_at":"2025-02-17T01:17:17.000Z","size":3170,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T01:18:00.128Z","etag":null,"topics":["animated-gif","hacktoberfest","linux","lzw-compression","swift"],"latest_commit_sha":null,"homepage":"https://fwcd.github.io/swift-gif/documentation/gif","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/fwcd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-29T21:12:42.000Z","updated_at":"2025-04-06T18:42:52.000Z","dependencies_parsed_at":"2024-02-13T02:30:17.492Z","dependency_job_id":"fc3193de-3792-442c-afd8-b0c565308a8a","html_url":"https://github.com/fwcd/swift-gif","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-gif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-gif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-gif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-gif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwcd","download_url":"https://codeload.github.com/fwcd/swift-gif/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250265643,"owners_count":21402147,"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","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":["animated-gif","hacktoberfest","linux","lzw-compression","swift"],"created_at":"2024-10-02T05:04:15.285Z","updated_at":"2025-04-22T15:24:43.331Z","avatar_url":"https://github.com/fwcd.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GIF Coder for Swift\n\n[![Build](https://github.com/fwcd/swift-gif/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/swift-gif/actions/workflows/build.yml)\n[![Docs](https://github.com/fwcd/swift-gif/actions/workflows/docs.yml/badge.svg)](https://fwcd.github.io/swift-gif/documentation/gif)\n\nA lightweight LZW encoder and decoder for animated GIFs written in pure Swift, thus running on any platform, including Linux.\n\n## Example\n\n```swift\n// Create a new GIF\nvar gif = GIF(width: 300, height: 300)\n\n// Add some frames for the animation\nfor i in 0..\u003c20 {\n    let image = try CairoImage(pngFilePath: \"frame\\(i).png\")\n    gif.frames.append(.init(image: image, delayTime: 100))\n}\n\n// Encode the GIF to a byte buffer\nlet data = try gif.encoded()\n```\n\n## Technical Details\n\nGIF encoding is more computationally intensive than decoding. It can become a bottleneck when GIF is used as a video codec and serialization must happen in real-time. Therefore, multicore CPU is used to accelerate the encoding of animated GIFs. All the animation frames are gathered into one `Array`, which is then divided among all CPU cores in the system.\n\n## System Dependencies\n\n* Swift 5.10+\n* Cairo, see [swift-graphics](https://github.com/fwcd/swift-graphics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-gif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwcd%2Fswift-gif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-gif/lists"}