{"id":28559043,"url":"https://github.com/sdwebimage/sdwebimagebpgcoder","last_synced_at":"2025-08-31T22:10:18.734Z","repository":{"id":54730422,"uuid":"108362702","full_name":"SDWebImage/SDWebImageBPGCoder","owner":"SDWebImage","description":"A BPG coder plugin for SDWebImage, use libbpg","archived":false,"fork":false,"pushed_at":"2023-06-14T08:50:10.000Z","size":36731,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-04T03:28:24.795Z","etag":null,"topics":["bpg","cocoapods","ios","macos","objective-c","sdwebimage"],"latest_commit_sha":null,"homepage":"","language":"C","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/SDWebImage.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}},"created_at":"2017-10-26T04:45:27.000Z","updated_at":"2024-10-22T13:28:23.000Z","dependencies_parsed_at":"2024-01-29T10:19:19.390Z","dependency_job_id":null,"html_url":"https://github.com/SDWebImage/SDWebImageBPGCoder","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.045454545454545414","last_synced_commit":"dfde3b858658febb20643c82f03549e1a9ac0e4a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImageBPGCoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImageBPGCoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImageBPGCoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImageBPGCoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SDWebImage","download_url":"https://codeload.github.com/SDWebImage/SDWebImageBPGCoder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImageBPGCoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259039544,"owners_count":22796853,"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":["bpg","cocoapods","ios","macos","objective-c","sdwebimage"],"created_at":"2025-06-10T08:35:58.008Z","updated_at":"2025-06-10T08:35:59.103Z","avatar_url":"https://github.com/SDWebImage.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDWebImageBPGCoder\n\n[![CI Status](http://img.shields.io/travis/SDWebImage/SDWebImageBPGCoder.svg?style=flat)](https://travis-ci.org/SDWebImage/SDWebImageBPGCoder)\n[![Version](https://img.shields.io/cocoapods/v/SDWebImageBPGCoder.svg?style=flat)](http://cocoapods.org/pods/SDWebImageBPGCoder)\n[![License](https://img.shields.io/cocoapods/l/SDWebImageBPGCoder.svg?style=flat)](http://cocoapods.org/pods/SDWebImageBPGCoder)\n[![Platform](https://img.shields.io/cocoapods/p/SDWebImageBPGCoder.svg?style=flat)](http://cocoapods.org/pods/SDWebImageBPGCoder)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/SDWebImage/SDWebImageBPGCoder)\n\n## What's for\n\nThis is a [SDWebImage](https://github.com/SDWebImage/SDWebImage) coder plugin to add [BPG Image Format](https://bellard.org/bpg/) support. Which is built based on the open-sourced [libbpg](https://github.com/mirrorer/libbpg) codec.\n\nThis BPG coder plugin support static BPG and animated BPG image decoding. It also include an optional codec based on the `bpgenc` to support static BPG and animated BPG encoding.\n\n## Requirements\n\n+ iOS 9.0\n+ macOS 10.11\n+ tvOS 9.0\n+ watchOS 2.0\n\n## Installation\n\n#### CocoaPods\n\nSDWebImageBPGCoder is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SDWebImageBPGCoder'\n```\n\nSDWebImageBPGCoder contains subspecs `libbpg` \u0026 `bpgenc`. Which integrate the codec plugin for libbpg and custom bpgenc to support BPG image decoding/encoding.\n\nTo enable BPG decoding, you should add `libbpg` subspec:\n\n```ruby\npod 'SDWebImageBPGCoder/libbpg'\n```\n\nTo enable BPG encoding, you should add `bpgenc` subspec:\n\n```ruby\npod 'SDWebImageBPGCoder/bpgenc'\n```\n\nBy default will contains only `libbpg` subspec for most people's usage. Using `bpgenc` encoding subspec only if you want BPG encoding.\n\n#### Carthage\n\nSDWebImageBPGCoder is available through [Carthage](https://github.com/Carthage/Carthage). Which use libbpg as dynamic framework.\n\nCarthage does not support like CocoaPods' subspec, since most of user use BPG decoding without x265 library. The framework through Carthage only supports libbpg for BPG decoding.\n\n```\ngithub \"SDWebImage/SDWebImageBPGCoder\"\n```\n\n## Usage\n\nTo use BPG coder, you should firstly add the `SDWebImageBPGCoder` to the coders manager. Then you can call the View Category method to start load BPG images.\n\n+ Objective-C\n\n```objective-c\nSDImageBPGCoder *BPGCoder = [SDImageBPGCoder sharedCoder];\n[[SDImageCodersManager sharedManager] addCoder:BPGCoder];\nUIImageView *imageView;\n[imageView sd_setImageWithURL:url];\n```\n\n+ Swift\n\n```swift\nlet BPGCoder = SDImageBPGCoder.shared\nSDImageCodersManager.shared.addCoder(BPGCoder)\nlet imageView: UIImageView\nimageView.sd_setImage(with: url)\n```\n\n`SDWebImageBPGCoder` also support BPG encoding (need bpgenc subspec). You can encode `UIImage` to BPG compressed image data.\n\n+ Objective-C\n\n```objectivec\nUIImage *image;\nNSData *imageData = [image sd_imageDataAsFormat:SDImageFormatBPG];\n```\n\n+ Swift\n\n```swift\nlet image;\nlet imageData = image.sd_imageData(as: .BPG)\n```\n\n## Screenshot\n\n\u003cimg src=\"https://raw.githubusercontent.com/SDWebImage/SDWebImageBPGCoder/master/Example/Screenshot/BPGDemo.png\" width=\"300\" /\u003e\n\nThe images are from [BPG official site](https://bellard.org/bpg/)\n\n## Author\n\nDreamPiggy\n\n## Thanks\n\n[libbpg](https://github.com/mirrorer/libbpg)\n\n## License\n\nSDWebImageBPGCoder is available under the MIT license. See the LICENSE file for more info.\n\nHowever, when using `bpgenc`, the license will be subject to GPL licence (or commercial licence if you have one). Because we use x265, and use a modified version of `bpgenc` (which is GPL). Check [x265.org](http://x265.org/) and [libbpg](https://github.com/mirrorer/libbpg) for more information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdwebimage%2Fsdwebimagebpgcoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdwebimage%2Fsdwebimagebpgcoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdwebimage%2Fsdwebimagebpgcoder/lists"}