SDWebImage / SDWebImageBPGCoder

A BPG coder plugin for SDWebImage, use libbpg
MIT License
11 stars 2 forks source link

can SDWebImage convert image to BPG? #1

Closed bizibizi closed 5 years ago

dreampiggy commented 5 years ago

Currently NO. The reason is because the BPG codec we used libbpg, does not provide a function about BPG encoding. It contains only decoding functions.

But actually, there is BPG encoding tool in BPG project, it's a command line bpgenc. However, you know, iOS sandbox app does not allows to exec another process and to use that like macOS. So this is the fact...

dreampiggy commented 5 years ago

But I can not say it's impossible. At least it's not hard to implements on macOS by embed the bpgenc command line tool and feed it with images bitmap. For iOS, let me investigate later to find out the way.

dreampiggy commented 5 years ago

@bizibizi The BPG encoding feature is implements via #3 ! The BPG encoding, supports static BPG as well as animated BPG.

I use a modified version of original command line bpgenc, make it works as a library instead of sub-process program.

It's available with v0.4.0 version. You can upgrade and have a try.

dreampiggy commented 5 years ago

@bizibizi v0.4.0 is released. You can upgrade your dependency via Podfile.

bizibizi commented 5 years ago

@dreampiggy sounds great, thank you for your message!