Swift Library to Apply Effects on Images via Filters
Open source Swift API that allows software developers to apply different kinds of effects on images using filters.
FlexibleImage is a very useful Swift library that allows software developers to create applications for working with images using Swift code. The library is very feature rich and has included support for applying different kinds of effects on images using filters. It supports filters like blur, invert, brightness, contrast, gamma effect, greyscale, and many more. It supports creating an image by writing a formula directly on a pixel-by-pixel basis. Developers can also add processing directly using Core Graphics.
The library is very easy to use and has provided powerful features for image processing and manipulation, such as image creation and editing, circle image generation, combining images to create a single image, creating a rectangular image, setting the background color, altering the transparency of the image, image rotation support, changing the image size, image scaling, setting margin and padding, clipping corner radius, drawing a border and so on. The library is open source and is available under the MIT license for public use.
At A Glance
An overview of FlexibleImage features.
- Camera filter
- View images
- Read image
- apply Effects
- Background color
- Set opacity
- Margin support
- Apply filters
- image animation
- Rotate Image
- Resize Image
- Memory management
FlexibleImage supports image processing as well as can export data to common file formats.
FlexibleImage only requires Swift to be installed.
Getting Started with FlexibleImage
Clone the latest sources using the following command.
Install FlexibleImage via GitHub.
$ git https://github.com/kawoou/FlexibleImage.git
Image Generation via Swift API
The FlexibleImage library enables software professionals to generate images with ease inside their swift applications. The library has included support for several ways to create images such as rectangular image generation, circular image creation, or combining images to create a new one. The library also supports editing images, resizing images, blurring images, applying a different background to images, and many more.
Generate Image via Swift API
let image1 = UIImage .circle( color: UIColor.blue, size: CGSize(width: 100, height: 100) )! .adjust() .offset(CGPoint(x: 25, y: 0)) .margin(UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5)) .padding(UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15)) .normal(color: UIColor.white) .border(color: UIColor.red, lineWidth: 5, radius: 50) .image()! .adjust() .background(color: UIColor.darkGray) .image()
Use Image Filtering via Swift
The open source FlexibleImage library has included a very valuable feature of applying filters to images using Swift code. It is a very valuable feature that can be used in various image processing and computer vision applications across the globe. The library supports several important filters such as smoothing or sharpening the image, enhanced edges, image blurring, image brightness, image inverting, and many more.
Apply Effect to Image via Swift API
let image2 = UIImage(named: "macaron.jpg")! .adjust() .outputSize(CGSize(width: 250, height: 250)) .exclusion(color: UIColor(red: 0, green: 0, blue: 0.352941176, alpha: 1.0)) .linearDodge(color: UIColor(red: 0.125490196, green: 0.058823529, blue: 0.192156863, alpha: 1.0)) .hardMix(color: UIColor(red: 0.3, green: 0.3, blue: 0.3, alpha: 1.0)) .image()
Image Resizing and Cropping Support
The free FlexibleImage library gives software programmers the capability to programmatically resize, scale, or crop images using Swift code. The library has included several important functions for image manipulation such as flipping the image, rotating images, flipping images horizontally or vertically, clipping corner radius, enhancing border size, and many more.