Swiftpack.co - MakeupStudio/iMage as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
MakeupStudio/iMage
Multiplatform image renderer for MacOS and iOS.
.package(url: "https://github.com/MakeupStudio/iMage.git", from: "1.0.0")

iMage

Multiplatform image renderer for MacOS and iOS.

Inspired by EricaSadun and UIGraphicsImageRenderer

Usage

For the best experience use it with Pallete

import iMage
import Palette
let redCirlce = IMage.render(in: someview.bounds) { let ctx = $0.cgContext 
    let ctx = $0.cgContext!
    ctx.setFillColor(.init(.white))
    ctx.fill(rect)
    ctx.addEllipse(in: rect.insetBy(dx: 10, dy: 10))
    ctx.setFillColor(.init(Color<RGB>.red.with(alpha: 0.7)))
    ctx.fillPath()
}

Installation

Add the package to Your SwiftPM package dependencies:

.package(url: "https://github.com/makeupstudio/iMage.git", from: "1.0.0")

then add iMage dependency to your target.

Examples

GitHub

link
Stars: 2
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics