https://github.com/chuganzy/hcimage-bpg
BPG decoder for iOS and OS X written in Obj-C++.
https://github.com/chuganzy/hcimage-bpg
bpg carthage cocoapods ios macos
Last synced: 2 months ago
JSON representation
BPG decoder for iOS and OS X written in Obj-C++.
- Host: GitHub
- URL: https://github.com/chuganzy/hcimage-bpg
- Owner: chuganzy
- License: mit
- Created: 2015-01-04T14:15:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T15:40:03.000Z (over 6 years ago)
- Last Synced: 2024-10-11T21:25:44.229Z (8 months ago)
- Topics: bpg, carthage, cocoapods, ios, macos
- Language: Ruby
- Homepage:
- Size: 11.3 MB
- Stars: 58
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/chuganzy/HCImage-BPG)
[](https://codecov.io/gh/chuganzy/HCImage-BPG)


# HCImage+BPG
BPG (http://bellard.org/bpg/) decoder for iOS and macOS.
## Features
- Supports macOS
- Supports iOS
- Supports animation
- Supports nullability## Usage
### iOS
- Objective-C
```objc
NSData *data = ...;
UIImage *image = [UIImage imageWithBPGData:data];
```- Swift
```swift
let data: NSData = ...
let image: UIImage? = UIImage(BPGData: data)
```### macOS
- Objective-C
```objc
NSData *data = ...;
NSImage *image = [NSImage imageWithBPGData:data];
```- Swift
```swift
let data: NSData = ...
let image: NSImage? = NSImage(BPGData: data)
```## Installation
### CocoaPods
```
pod 'HCImage+BPG'
```### Carthage
```
github "chuganzy/HCImage-BPG"
```## License
MIT.
### libbpg
https://github.com/thomas-huet/libbpg
libbpg and bpgenc are released under the LGPL license (the FFmpeg part is under the LGPL, the BPG specific part is released under the BSD license).
BPG relies on the HEVC compression technology which may be protected by patents in some countries. Most devices already include or will include hardware HEVC support, so we suggest to use it if patents are an issue.