Toucan alternatives and similar libraries
Based on the "Images" category.
Alternatively, view Toucan 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. -
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. -
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. -
XAnimatedImage
XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage -
Viewer
Image viewer (or Lightbox) with support for local and remote videos and images -
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. -
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. -
ImageDetect
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api. -
DTPhotoViewerController
A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer. -
Harbeth
Metal API for GPU accelerated Image and Video and Camera filter framework. Support macOS & iOS. 🎨 图像、视频、相机滤镜框架 -
LetterAvatarKit
📲 Use this extension 🧩 to create letter-based avatars or placeholders 🎭 to be utilized within your app
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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 Toucan or a related project?
README
Toucan is a Swift library that provides a clean, quick API for processing images. It greatly simplifies the production of images, supporting resizing, cropping and stylizing your images.
Features
- Easy and smart resizing
- Elliptical and rounded rect masking
- Mask with custom images
- Chainable image processing stages
Requirements
- Xcode 10.0+
- iOS 11.0+
Setup
- Install using CocoaPods: https://cocoapods.org/pods/Toucan
- or manually include the
Toucan
framework by dragging it into your project and import the library in your code usingimport Toucan
Toucan Usage
Toucan provides two methods of interaction - either through wrapping an single image within a Toucan instance, or through the static functions, providing an image for each invocation. This allows for some very flexible usage.
Create an instance wrapper for easy method chaining:
let resizedAndMaskedImage = Toucan(image: myImage).resize(CGSize(width: 100, height: 150)).maskWithEllipse().image
Or, using static methods when you need a single operation:
let resizedImage = Toucan.Resize.resizeImage(myImage, size: CGSize(width: 100, height: 150))
let resizedAndMaskedImage = Toucan.maskWithEllipse(resizedImage)
Typically, the instance version is a bit cleaner to use, and the one you want.
Resizing
Resize the contained image to the specified size. Depending on what fitMode
is supplied, the image may be clipped, cropped or scaled.
Toucan(image: myImage).resize(size: CGSize, fitMode: Toucan.Resize.FitMode)
Fit Mode
FitMode drives the resizing process to determine what to do with an image to make it fit the given size bounds.
Example | Mode |
---|---|
![]() |
Clip ModeToucan.Resize.FitMode.Clip Resizes the image to fit within the width and height boundaries without cropping or distorting the image.Toucan(image: portraitImage).resize(CGSize(width: 500, height: 500), fitMode: Toucan.Resize.FitMode.Clip).image |
![]() |
Crop ModeToucan.Resize.FitMode.crop Resizes the image to fill the width and height boundaries and crops any excess image data.Toucan(image: portraitImage).resize(CGSize(width: 500, height: 500), fitMode: Toucan.Resize.FitMode.Crop).image |
![]() |
Scale ModeToucan.Resize.FitMode.scale Scales the image to fit the constraining dimensions exactly.Toucan(image: portraitImage).resize(CGSize(width: 500, height: 500), fitMode: Toucan.Resize.FitMode.Scale).image |
Masking
Alter the original image with a mask; supports ellipse, rounded rect and image masks.
Ellipse Mask
Example | Function |
---|---|
![]() |
Mask the given image with an ellipse. Allows specifying an additional border to draw on the clipped image. For a circle, ensure the image width and height are equal!Toucan(image: myImage).maskWithEllipse().image |
![]() |
When specifying a border width, it is draw on the clipped image.Toucan(image: myImage).maskWithEllipse(borderWidth: 10, borderColor: UIColor.yellowColor()).image |
Path Mask
Example | Function |
---|---|
![]() |
Mask the given image with a path. The path will be scaled to fit the image correctly!path.moveToPoint(CGPointMake(0, 50)) path.addLineToPoint(CGPointMake(50, 0)) path.addLineToPoint(CGPointMake(100, 50)) path.addLineToPoint(CGPointMake(50, 100)) path.closePath() Toucan(image: myImage).maskWithPath(path: path).image |
![]() |
Mask the given image with a path provided via a closure. This allows you to construct your path relative to the bounds of the image!Toucan(image: myImage).maskWithPathClosure(path: (rect: CGRect) -> (UIBezierPath)).image |
Rounded Rect Mask
Example | Function |
---|---|
![]() |
Mask the given image with a rounded rectangle border. Allows specifying an additional border to draw on the clipped image.Toucan(image: myImage).maskWithRoundedRect(cornerRadius: 30).image |
![]() |
When specifying a border width, it is draw on the clipped rounded rect.Toucan(image: myImage).maskWithRoundedRect(cornerRadius: 30, borderWidth: 10, borderColor: UIColor.purpleColor()).image |
Image Mask
Example | Function |
---|---|
![]() |
Mask the given image with another image mask. Note that the areas in the original image that correspond to the black areas of the mask show through in the resulting image. The areas that correspond to the white areas of the mask aren’t painted. The areas that correspond to the gray areas in the mask are painted using an intermediate alpha value that’s equal to 1 minus the image mask sample value.Toucan(image: myImage).maskWithImage(maskImage: octagonMask).image |
Example Images
Example images used under Creative Commons with thanks to:
Contributing
- Please fork this project
- Implement new methods or changes in the
Toucan.swift
file. - Write tests in the
ToucanTests
folder. - Write appropriate docs and comments in the README.md
- Submit a pull request.
Contact
Raise an Issue or hit me up on Twitter @gavinbunney
License
Toucan is released under an MIT license. See LICENSE for more information.
*Note that all licence references and agreements mentioned in the Toucan README section above
are relevant to that project's source code only.