Swift Package Index


Rasterize SwiftUI views into bitmap images.


  • The latest stable release is 0.0.1. Released 23 days ago.
  • The last commit to main was 22 days ago.

Swift Version Compatibility

  • 0.0.1 and main
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.0.1 and main
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

Raster

CI Mac

Rasterize a SwiftUI view into an image.

testExample.1

How to use

import Raster

let view = ... any SwiftUI view
let image = view.rasterize(at: size)

Installation

dependencies: [
   .package(url: "https://github.com/alexito4/Raster.git", from: "0.0.1")
],
...
.target(
    dependencies: [
        "Raster"
    ],
),

Author

Alejandro Martinez | http://alejandromp.com | @alexito4