GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SDWebImage/SDWebImageBPGCoder: A BPG coder plugin for SDWebImage, use libbpg

BranchesTags
Open more actions menu

Latest commit

 

History

51 Commits
51 Commits

Folders and files

NameName
Last commit message
Last commit date
Example
Example
 
 
SDWebImageBPGCoder.xcodeproj
SDWebImageBPGCoder.xcodeproj
 
 
SDWebImageBPGCoder
SDWebImageBPGCoder
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Cartfile
Cartfile
 
 
Cartfile.resolved
Cartfile.resolved
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SDWebImageBPGCoder.podspec
SDWebImageBPGCoder.podspec
 
 
_Pods.xcodeproj
_Pods.xcodeproj
 
 

Repository files navigation

SDWebImageBPGCoder

CI Status Version License Platform Carthage compatible

What's for

This is a SDWebImage coder plugin to add BPG Image Format support. Which is built based on the open-sourced libbpg codec.

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.

Requirements

  • iOS 9.0
  • macOS 10.11
  • tvOS 9.0
  • watchOS 2.0

Installation

CocoaPods

SDWebImageBPGCoder is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SDWebImageBPGCoder'

SDWebImageBPGCoder contains subspecs libbpg & bpgenc. Which integrate the codec plugin for libbpg and custom bpgenc to support BPG image decoding/encoding.

To enable BPG decoding, you should add libbpg subspec:

pod 'SDWebImageBPGCoder/libbpg'

To enable BPG encoding, you should add bpgenc subspec:

pod 'SDWebImageBPGCoder/bpgenc'

By default will contains only libbpg subspec for most people's usage. Using bpgenc encoding subspec only if you want BPG encoding.

Carthage

SDWebImageBPGCoder is available through Carthage. Which use libbpg as dynamic framework.

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.

github "SDWebImage/SDWebImageBPGCoder"

Usage

To use BPG coder, you should firstly add the SDWebImageBPGCoder to the coders manager. Then you can call the View Category method to start load BPG images.

  • Objective-C
SDImageBPGCoder *BPGCoder = [SDImageBPGCoder sharedCoder];
[[SDImageCodersManager sharedManager] addCoder:BPGCoder];
UIImageView *imageView;
[imageView sd_setImageWithURL:url];
  • Swift
let BPGCoder = SDImageBPGCoder.shared
SDImageCodersManager.shared.addCoder(BPGCoder)
let imageView: UIImageView
imageView.sd_setImage(with: url)

SDWebImageBPGCoder also support BPG encoding (need bpgenc subspec). You can encode UIImage to BPG compressed image data.

  • Objective-C
UIImage *image;
NSData *imageData = [image sd_imageDataAsFormat:SDImageFormatBPG];
  • Swift
let image;
let imageData = image.sd_imageData(as: .BPG)

Screenshot

The images are from BPG official site

Author

DreamPiggy

Thanks

libbpg

License

SDWebImageBPGCoder is available under the MIT license. See the LICENSE file for more info.

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 and libbpg for more information.

About

A BPG coder plugin for SDWebImage, use libbpg

Topics

bpgcocoapodsiosmacosobjective-csdwebimage

Resources

Readme
MIT license
Activity
Custom properties

Stars

11 stars

Watchers

5 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.