Image blurring in Swift.
This library is a small CoreImage wrapper that performs a variety of blurring techniques based on the given parameters.
Need a different version of Swift?
4.2
- Target your Podfile to theswift4.2
branch4.0
- Target your Podfile to the latest release or master
Blurry
is available and recommended for installation using the Cocoa dependency manager CocoaPods. You can also simply copy the Blurry.swift
file into your Xcode project.
# CocoaPods
swift_version = "4.2"
pod "Blurry", "~> 0.1.0"
# Carthage
github "piemonte/Blurry" ~> 0.1.0
# SwiftPM
let package = Package(
dependencies: [
.Package(url: "https://github.com/piemonte/Blurry", majorVersion: 0)
]
)
import Blurry
// using UIImage extension, an example with a few parameters
let blurryImage = originalImage.blurryImage(blurRadius: 12.0)
// or if you prefer no extension, an example with more parameters
let blurryImage = Blurry.blurryImage(withOptions: BlurryOptions.pro, overlayColor: overlayColor, forImage: sampleImage, size: sampleImage.size, blurRadius: 12.0)
Blurry is available under the MIT license, see the LICENSE file for more information.