Latest 1.4.0
Homepage https://github.com/chuganzy/HCImage-BPG
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Authors

Build Status
codecov
CocoaPods
Carthage
Platform

BPG (http://bellard.org/bpg/) decoder for iOS and macOS.

Features

  • Supports macOS
  • Supports iOS
  • Supports animation
  • Supports nullability

Usage

iOS

  • Objective-C
NSData *data = ...;
UIImage *image = [UIImage imageWithBPGData:data];
  • Swift
let data: NSData = ...
let image: UIImage? = UIImage(BPGData: data)

macOS

  • Objective-C
NSData *data = ...;
NSImage *image = [NSImage imageWithBPGData:data];
  • 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.

Latest podspec

{
    "name": "HCImage+BPG",
    "version": "1.4.0",
    "source": {
        "git": "https://github.com/chuganzy/HCImage-BPG.git",
        "tag": "1.4.0"
    },
    "summary": "BPG decoder for iOS and OS X",
    "homepage": "https://github.com/chuganzy/HCImage-BPG",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Takeru Chuganji": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "requires_arc": true,
    "source_files": [
        "HCImage+BPG/*.{h,mm}",
        "HCImage+BPG/Internal/**/*.{h,hpp,cpp}"
    ],
    "private_header_files": "HCImage+BPG/Internal/**/*.{h,hpp}",
    "osx": {
        "vendored_libraries": "HCImage+BPG/Internal/libbpg/lib/mac/*.a",
        "frameworks": [
            "AppKit",
            "CoreGraphics"
        ]
    },
    "ios": {
        "vendored_libraries": "HCImage+BPG/Internal/libbpg/lib/ios/*.a",
        "frameworks": [
            "UIKit",
            "CoreGraphics"
        ]
    },
    "libraries": "c++"
}

Pin It on Pinterest

Share This