BPG (http://bellard.org/bpg/) decoder for iOS and macOS.
- Supports macOS
- Supports iOS
- Supports animation
- Supports nullability
- Objective-C
NSData *data = ...;
UIImage *image = [UIImage imageWithBPGData:data];
- Swift
let data: NSData = ...
let image: UIImage? = UIImage(BPGData: data)
- Objective-C
NSData *data = ...;
NSImage *image = [NSImage imageWithBPGData:data];
- Swift
let data: NSData = ...
let image: NSImage? = NSImage(BPGData: data)
pod 'HCImage+BPG'
github "chuganzy/HCImage-BPG"
MIT.
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.