You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
This 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.
12
12
13
-
This BPG coder plugin currently support static BPG and animated BPG image decoding.
13
+
This 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.
14
14
15
15
## Requirements
16
16
@@ -30,10 +30,28 @@ it, simply add the following line to your Podfile:
30
30
pod 'SDWebImageBPGCoder'
31
31
```
32
32
33
+
SDWebImageBPGCoder contains subspecs `libbpg` & `bpgenc`. Which integrate the codec plugin for libbpg and custom bpgenc to support BPG image decoding/encoding.
34
+
35
+
To enable BPG decoding, you should add `libbpg` subspec:
36
+
37
+
```ruby
38
+
pod 'SDWebImageBPGCoder/libbpg'
39
+
```
40
+
41
+
To enable BPG encoding, you should add `bpgenc` subspec:
42
+
43
+
```ruby
44
+
pod 'SDWebImageBPGCoder/bpgenc'
45
+
```
46
+
47
+
By default will contains only `libbpg` subspec for most people's usage. Using `bpgenc` encoding subspec only if you want BPG encoding.
48
+
33
49
#### Carthage
34
50
35
51
SDWebImageBPGCoder is available through [Carthage](https://github.com/Carthage/Carthage). Which use libbpg as dynamic framework.
36
52
53
+
Carthage 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.
54
+
37
55
```
38
56
github "SDWebImage/SDWebImageBPGCoder"
39
57
```
@@ -60,6 +78,22 @@ let imageView: UIImageView
60
78
imageView.sd_setImage(with: url)
61
79
```
62
80
81
+
`SDWebImageBPGCoder` also support BPG encoding (need bpgenc subspec). You can encode `UIImage` to BPG compressed image data.
SDWebImageBPGCoder is available under the MIT license. See the LICENSE file for more info.
80
114
115
+
However, 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.
0 commit comments