FlexibleImage alternatives and similar libraries
Based on the "Images" category.
Alternatively, view FlexibleImage alternatives based on common mentions on social networks and blogs.
-
SDWebImage
Asynchronous image downloader with cache support as a UIImageView category -
Kingfisher
A lightweight, pure-Swift library for downloading and caching images from the web. -
SwiftGen-Assets
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
GPUImage 2
GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing. -
HanekeSwift
A lightweight generic cache for iOS written in Swift with extra love for images. -
YPImagePicker
📸 Instagram-like image picker & filters for iOS -
SkyFloatingLabelTextField
A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift. -
AlamofireImage
AlamofireImage is an image component library for Alamofire -
UIImageColors
Fetches the most dominant and prominent colors from an image. -
Brightroom
📷 A composable image editor using Core Image and Metal. [Moved to: https://github.com/FluidGroup/Brightroom] -
GPUImage 3
GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal. -
APNGKit
High performance and delightful way to play with APNG format in iOS. -
Lightbox
:milky_way: A convenient and easy to use image viewer for your iOS app -
TinyCrayon
A smart and easy-to-use image masking and cutout SDK for mobile apps. -
SwiftGif
[UNMAINTAINED] 🌠 A small UIImage extension with gif support -
Sharaku
(Not maintained)Image filtering UI library like Instagram. -
CTPanoramaView
A library that displays spherical or cylindrical panoramas with touch or motion based controls. -
ImageScout
A Swift implementation of fastimage. Supports PNG, GIF, and JPEG. -
FMPhotoPicker
A modern, simple and zero-dependency photo picker with an elegant and customizable image editor -
AXPhotoViewer
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos. -
PassportScanner
Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer. -
Viewer
Image viewer (or Lightbox) with support for local and remote videos and images -
XAnimatedImage
XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage -
JLStickerTextView
add text(multiple line support) to imageView, edit, rotate or resize them as you want, then render the text on image -
UIImageView-BetterFace-Swift
autoresize images and if any face discovered refine the position of the image. -
Harbeth
🎨 GPU accelerated image / video and camera filter library based on Metal. Support macOS & iOS. 图像、视频、相机滤镜框架 -
MapleBacon
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations -
Moa
An image download extension of the image view written in Swift for iOS, tvOS and macOS. -
KFSwiftImageLoader
An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and Watch. -
MCScratchImageView
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below. -
ImageLoader
A lightweight and fast image loader for iOS written in Swift. -
FacebookImagePicker
FacebookImagePicker is Facebook album photo picker written in Swift. -
DTPhotoViewerController
A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer. -
ImageDetect
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api. -
SwiftDraw
Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code. -
SwiftColorArt
font schema generator according image colours.
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of FlexibleImage or a related project?
README
FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme. When you write code in the "Method Chaining" style, the effect is applied in the appropriate order.
You may want to see [Examples](#-example) section first if you'd like to see the actual code.
💡 Usage
Code
import UIKit
import FlexibleImage
/// Generate Example
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()
/// Effect Example
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()
/// Mix Example
let image3 = image2!.adjust()
.append(
image1!.adjust()
.outputSize(CGSize(width: 250, height: 250))
.alpha(0.5)
)
.image()
/// Clipping Example
let image4 = image3!.adjust()
.corner(CornerType(25))
.image()
/// Pipeline
let pipeline = ImagePipeline()
.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))
let image5 = pipeline.image(image2)
let image6 = pipeline.image(image1)
Playground
Use CocoaPods command $ pod try FlexibleImage
to try Playground!
🏗 Installation
CocoaPods (For iOS 8+ projects)
KWDrawerController is available on CocoaPods. Add the following to your Podfile:
/// Swift 3
pod 'FlexibleImage', '~> 1.7'
/// Swift 4
pod 'FlexibleImage', '~> 1.9'
Carthage (For iOS 8+ projects)
github "kawoou/FlexibleImage" ~> 1.9
Manually
You can either simply drag and drop the Sources
folder into your existing project.
📕 Supported Features
Common
Type | Parameter | Comments |
---|---|---|
background() | Color | Background color. |
opacity() | Float | Change the transparency of the image. |
alphaProcess() | Bool | Whether to include an alpha value during image processing. |
(Deprecated) |
||
offset() | CGPoint | The position of the image to be a drawing. |
rotate() | radius: CGFloatfixedSize: CGSize [Optional] | Rotate an image. |
size() | CGSize | The size of the image to be a drawing. |
outputSize() | CGSize | The size of a Output image. |
scaling() | CGSize | Scaling the image (ratio) |
margin() | EdgeInsets | Margin size |
padding() | EdgeInsets | Padding size |
corner() | CornerType | To clipping corner radius. |
border() | color: ColorlineWidth: CGFloatradius: CGFloat | Drawing a border. |
image() | Run the pipeline to create the Output image. |
Filter
Type | Parameter | Comments |
---|---|---|
greyscale() | threshold: Float [Optional] | |
monochrome() | threshold: Float [Optional] | |
invert() | ||
sepia() | ||
vibrance() | vibrance: Float [Optional] | |
solarize() | threshold: Float [Optional] | |
posterize() | colorLevel: Float [Optional] | |
blur() | blurRadius: Float [Optional] | Not supported by watchOS. |
brightness() | brightness: Float [Optional] | |
chromaKey() | color: FIColorthreshold: Float [Optional]smoothing: Float [Optional] | |
swizzling() | ||
contrast() | threshold: Float [Optional] | |
gamma() | gamma: Float [Optional] |
Blend
Type | Parameter |
---|---|
normal() | Color |
multiply() | Color |
lighten() | Color |
darken() | Color |
average() | Color |
add() | Color |
subtract() | Color |
difference() | Color |
negative() | Color |
screen() | Color |
exclusion() | Color |
overlay() | Color |
softLight() | Color |
hardLight() | Color |
colorDodge() | Color |
colorBurn() | Color |
linearDodge() | Color |
linearBurn() | Color |
linearLight() | Color |
vividLight() | Color |
pinLight() | Color |
hardMix() | Color |
reflect() | Color |
glow() | Color |
phoenix() | Color |
hue() | Color |
saturation() | Color |
color() | Color |
luminosity() | Color |
Post-processing
Type | Parameter | Comments |
---|---|---|
algorithm() | AlgorithmType | Create an image by writing a formula directly on a pixel-by-pixel basis. |
custom() | ContextType | Add processing directly using Core Graphics. |
Generate
Type | Comments |
---|---|
rect() | Create a rectangular image. |
circle() | Create a circle image. |
append() | Combine images to create a single image. |
Pipeline (ImagePipeline
class)
Type | Parameter | Return | Comments |
---|---|---|---|
image() | FIImage | FIImage? | Create the Output image. |
image() | CGImage | CGImage? | Create the Output image. |
image() | CVImageBuffer | CGImage? | Create the Output image. |
🎁 Example
- iOS APP Example
- iOS Playground Example
- macOS App Example
- macOS Playground Example
- tvOS App Example
- tvOS Playground Example
🏷 Changelog
- 1.0
- First Release.
- 1.1
- Add to clipping corner radius.
- 1.2
- Support tvOS, macOS.
- 1.3
- Support watchOS.
- Added monochrome, sepia, vibrance, solarize, posterize filters.
- Update resize methods.
- 1.4
- Add blur filter.
- Optimize build time.
- Setup TravisCI
- Support carthage.
- 1.5
- Support Metal depending on the situation.
- Added brightness, chromaKey, swizzling, contrast, gamma filters.
- 1.6 (Hotfix!)
- Fix issue Metal library path on Cocoapods.
- 1.7
- Pipelined implementation for stream processing.
- Fix rendering bug due to image orientation (Thanks to Kwonyoon Kang)
- 1.8
- Support for Swift 4 and Xcode 9
- 1.9
- Support for Swift 4.1 and Xcode 9.3
- 1.10
- Support for Swift 4.2 and Xcode 10
💻 Requirements
- iOS 8.0+
- tvOS 9.0+
- macOS 10.10+
- watchOS 2.0+
- Swift 3.0+
🔑 License
FlexibleImage is under MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the FlexibleImage README section above
are relevant to that project's source code only.