An open API service indexing awesome lists of open source software.

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++.

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/chuganzy/HCImage-BPG.svg?branch=master)](https://travis-ci.org/chuganzy/HCImage-BPG)
[![codecov](https://codecov.io/gh/chuganzy/HCImage-BPG/branch/master/graph/badge.svg)](https://codecov.io/gh/chuganzy/HCImage-BPG)
![CocoaPods](https://img.shields.io/cocoapods/v/HCImage+BPG.svg)
![Carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)
![Platform](https://img.shields.io/cocoapods/p/HCImage+BPG.svg)

# 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.