Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A wrapper for libwebp + Xcode project. Support Carthage && CocoaPods && SwiftPM.

License

NotificationsYou must be signed in to change notification settings

SDWebImage/libwebp-Xcode

Repository files navigation

A wrapper forlibwebp + Xcode project.This enables Carthage supportThis also contains the Swift Package Manager support

CI StatusCarthage compatibleSwiftPM compatible

Requirements

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

Installation

CocoaPods

libwebp is available throughCocoaPods. To install it, simply add the following line to your Podfile:

pod'libwebp'

Carthage

libwebp is (via this repo) available throughCarthage.

github "SDWebImage/libwebp-Xcode"

SwiftPM

Libwebp is available throughSwift Package Manager.

letpackage=Package(    dependencies:[.package(url:"https://github.com/SDWebImage/libwebp-Xcode", from:"1.1.0")],    // ...)

Usage

Use libwebp as you would normally, this is just a repo that adds an Xcode proj.

For Swift Package Manager user, it's recommended to use the modular import instead of C headers.

  • Objective-C
@import libwebp;// or if you don't use module#import<webp/decode.h>#import<webp/encode.h>
  • Swift
import libwebp

About sharpyuv

From libwebp v1.2.3, Google separate some functions into a new standalone lib calledsharpyuv. However, it dependeny source code from libwebp repo'ssrc as implementation. Like llvm-project monorepo, one repo host multiple targets.

Before v1.3.0, we hide these headers as internal headers.

From v1.3.0, we expose the sharpyuv public headers, but not a standalone CocoaPods/SPM/Carthage Target. (In the future we may consider separate targets)

If you want to use sharpyuv functions, do something like this:

  • Objective-C
// This does not supports module include#if __has_include(<sharpyuv/sharpyuv.h>)#import <sharpyuv/sharpyuv.h>#else#import <libwebp/sharpyuv.h> // bundled in libwebp's modulemap#endif
  • Swift
#if canImport(sharpyuv)import sharpyuv#elseimport libwebp // bundled in libwebp's modulemap#endif

License

libwebp is available under the BSD-3 license. Seethe LICENSE file for more info.

About

A wrapper for libwebp + Xcode project. Support Carthage && CocoaPods && SwiftPM.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp