{"id":30321139,"url":"https://github.com/wflixu/liveimage","last_synced_at":"2026-06-08T10:32:08.210Z","repository":{"id":307758600,"uuid":"1030613554","full_name":"wflixu/LiveImage","owner":"wflixu","description":"🎬 A high-performance SwiftUI animated image library supporting GIF, APNG and WebP formats","archived":false,"fork":false,"pushed_at":"2025-11-30T10:15:28.000Z","size":1845,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-02T14:43:56.205Z","etag":null,"topics":["animation","apng","gif","macos","swift","swift6","swiftui","webp"],"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/wflixu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-02T00:47:26.000Z","updated_at":"2025-11-30T10:19:55.000Z","dependencies_parsed_at":"2025-08-02T03:40:36.648Z","dependency_job_id":"51e7e7f2-16e4-4db2-9504-8551e825c247","html_url":"https://github.com/wflixu/LiveImage","commit_stats":null,"previous_names":["wflixu/liveimage"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wflixu/LiveImage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2FLiveImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2FLiveImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2FLiveImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2FLiveImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wflixu","download_url":"https://codeload.github.com/wflixu/LiveImage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2FLiveImage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34059154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["animation","apng","gif","macos","swift","swift6","swiftui","webp"],"created_at":"2025-08-17T21:21:16.734Z","updated_at":"2026-06-08T10:32:08.204Z","avatar_url":"https://github.com/wflixu.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LiveImage\n\nLiveImage 是一个用于 SwiftUI 的高性能动图显示库，支持 GIF、APNG 和 WebP 格式。适用于 macOS 15+ 和 iOS 18+，基于 Swift 6 开发。该仓库还包含一个用于演示和测试的示例应用 [LiveImageDemo](#liveimagedemo)。\n\n## 特性\n\n- 支持 GIF、APNG、WebP 动图格式\n- 原生 SwiftUI 组件，易于集成\n- 高性能解码与渲染\n- 支持 macOS 15+ 和 iOS 18+\n- 现代 Swift 6 语法与最佳实践\n\n## 安装\n\n### Swift Package Manager\n\n在 `Package.swift` 的 dependencies 添加：\n\n```swift\n.package(url: \"https://github.com/wflixu/LiveImage.git\", from: \"1.0.0\")\n```\n\n或在 Xcode 中通过 `File \u003e Add Packages...` 搜索 `LiveImage` 并添加。\n\n## 🚀 快速开始\n\n### 安装依赖\n```swift\n// Package.swift\ndependencies: [\n    .package(url: \"https://github.com/wflixu/LiveImage.git\", from: \"1.0.0\")\n]\n```\n\n### 基本使用\n\n```swift\nimport LiveImage\nimport SwiftUI\n\nstruct ContentView: View {\n    var body: some View {\n        VStack {\n            // GIF 动画\n            if let gifUrl = Bundle.main.url(forResource: \"animation\", withExtension: \"gif\") {\n                LiveImage(url: gifUrl)\n                    .frame(width: 200, height: 200)\n            }\n\n            // APNG 动画\n            if let apngUrl = Bundle.main.url(forResource: \"animation\", withExtension: \"png\") {\n                LiveImage(url: apngUrl)\n                    .frame(width: 300, height: 300)\n            }\n\n            // WebP 动画\n            if let webpUrl = Bundle.main.url(forResource: \"animation\", withExtension: \"webp\") {\n                LiveImage(url: webpUrl)\n                    .frame(width: 250, height: 250)\n            }\n        }\n    }\n}\n```\n\n### 高级配置\n\n```swift\nimport LiveImage\nimport SwiftUI\n\nstruct ContentView: View {\n    @State private var isPlaying = true\n\n    var body: some View {\n        LiveImage(url: gifUrl)\n            .frame(width: 200, height: 200)\n            .onTapGesture {\n                isPlaying.toggle()\n            }\n            .environment(\\.animatedImageViewConfiguration, AnimatedImageViewConfiguration.performance)\n    }\n}\n```\n\n## 支持平台\n\n- macOS 15 及以上\n- iOS 18 及以上\n- Swift 6.0 及以上\n\n## 📸 LiveImageDemo - 完整演示应用\n\n本仓库包含 `LiveImageDemo` 示例项目，方便测试和演示 LiveImage 的功能。你可以直接运行该项目体验库的实际效果。\n\n### 🖼️ 运行截图展示\n\n以下是 LiveImage 在不同格式动画下的实际运行效果：\n\n#### 🎬 GIF 动画演示\n![GIF 动画演示](Sources/Demo/Resources/screen/liveimage-gif.png)\n- **格式**: 标准 GIF 格式，128x128 像素，2帧动画\n- **效果**: 流畅的循环播放，经典的动图效果\n\n#### 🎨 APNG 动画演示\n![APNG 动画演示](Sources/Demo/Resources/screen/liveimage-apng.png)\n- **格式**: APNG 动画格式，480x400 像素，34帧动画\n- **效果**: 高质量的多帧动画，PNG 的无损压缩与透明度支持\n\n#### 🌐 WebP 动画演示\n![WebP 动画演示](Sources/Demo/Resources/screen/liveimage-webp.png)\n- **格式**: WebP 动画格式，400x400 像素，12帧动画\n- **效果**: 现代化的 Web 格式动画，优秀的压缩比与现代浏览器兼容\n\n### ✨ 演示特性\n\nLiveImageDemo 展示了以下核心功能：\n\n| 特性 | 描述 | 状态 |\n|------|------|------|\n| 🎬 **多格式支持** | 同时支持 GIF、APNG、WebP 三种主流动画格式 | ✅ 完成 |\n| ⚡ **高性能渲染** | 基于 CADisplayLink 的 60fps 流畅动画播放 | ✅ 完成 |\n| 🎨 **SwiftUI 集成** | 原生 SwiftUI 组件，无缝集成到现代应用中 | ✅ 完成 |\n| ⚙️ **可配置播放** | 支持自定义播放速度、循环次数等参数 | ✅ 完成 |\n| 📱 **跨平台兼容** | 支持 macOS 15+ 和 iOS 18+ 平台 | ✅ 完成 |\n\n\n\n## 🚀 运行 Demo\n\n```bash\n# 克隆仓库\ngit clone https://github.com/wflixu/LiveImage.git\n\n# 进入项目\ncd LiveImage\n\n# 运行演示\nswift run Demo\n```\n\n## 贡献\n\n欢迎 issue 和 PR！请遵循 [贡献指南](CONTRIBUTING.md)（如有）。\n\n## 开发与测试\n\n- 当前开发环境：macOS 15.5，Swift 6.1.2\n- 推荐使用 Xcode 15.4 及以上版本\n\n## 📜 License\n\nMIT License. 详见 [LICENSE](LICENSE) 文件。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwflixu%2Fliveimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwflixu%2Fliveimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwflixu%2Fliveimage/lists"}