Latest 0.5.0
Homepage https://github.com/yeatse/KingfisherWebP
License MIT
Platforms ios 10.0, tvos 10.0, watchos 3.0
Dependencies Kingfisher, libwebp
Authors

CI Status
Version
License
Platform

Description

KingfisherWebP is an extension of the popular library Kingfisher, providing an ImageProcessor and CacheSerializer for you to conveniently handle the WebP format.

The library works seamlessly with Kingfisher. To display the webp images from network, simply add WebPProcessor and WebPSerializer to your KingfisherOptionsInfo:

let url = URL(string: "url_of_your_webp_image")
imageView.kf.setImage(with: url, options: [.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)])

For convenience, you may set it as a global default option to all KingfisherManager related methods:

// somewhere after your application launches...
KingfisherManager.shared.defaultOptions = [.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)]

// You can now use webp in Kingfisher like any other format
imageView.kf.setImage(with: url)

If the image data is not in webp format, the default processor and serializer in Kingfisher will be used.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8 or above

Installation

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

pod "KingfisherWebP"

Author

Yang Chao, [email protected]

License

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

Latest podspec

{
    "name": "KingfisherWebP",
    "version": "0.5.0",
    "summary": "A Kingfisher extension helping you process webp format",
    "description": "KingfisherWebP is an extension of the popular library [Kingfisher](https://github.com/onevcat/Kingfisher), providing a ImageProcessor and CacheSerializer for you to conveniently handle the WebP format.",
    "homepage": "https://github.com/yeatse/KingfisherWebP",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Yang Chao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yeatse/KingfisherWebP.git",
        "tag": "0.5.0"
    },
    "social_media_url": "https://twitter.com/yeatse",
    "platforms": {
        "ios": "10.0",
        "tvos": "10.0",
        "watchos": "3.0"
    },
    "source_files": "KingfisherWebP/Classes/**/*",
    "public_header_files": "KingfisherWebP/Classes/KingfisherWebP-umbrella.h",
    "private_header_files": "KingfisherWebP/Classes/CGImage+WebP.h",
    "module_map": "KingfisherWebP/KingfisherWebP.modulemap",
    "xcconfig": {
        "USER_HEADER_SEARCH_PATHS": "$(inherited) $(SRCROOT)/libwebp/src"
    },
    "tvos": {
        "xcconfig": {
            "USER_HEADER_SEARCH_PATHS": "$(inherited) $(SRCROOT)/libwebp/src"
        }
    },
    "osx": {
        "xcconfig": {
            "USER_HEADER_SEARCH_PATHS": "$(inherited) $(SRCROOT)/libwebp/src"
        }
    },
    "watchos": {
        "xcconfig": {
            "GCC_PREPROCESSOR_DEFINITIONS": "$(inherited) WEBP_USE_INTRINSICS=1",
            "USER_HEADER_SEARCH_PATHS": "$(inherited) $(SRCROOT)/libwebp/src"
        }
    },
    "dependencies": {
        "Kingfisher": [
            "~> 5.0"
        ],
        "libwebp": [
            ">= 0.5.0"
        ]
    }
}

Pin It on Pinterest

Share This