Contents

simformsolutionspvtltd/ssimagekit

SSImageKit is an advanced and versatile toolkit tailored for image processing. At its core, SSImageKitEngine empowers real-time image editing, preserving a non-destructive workflow. Meanwhile, SSImageKit offers SwiftUI views enriched with configurable elements, seamlessly integra

Features

  • [x] Customizable components
  • [x] Crop & Rotation with custom ratio
  • [x] Light adjustment (Brightness, Contrast, Saturation, Hue)
  • [x] Blur
  • [x] Default & Custom Filter
  • [x] Detail (Sharpness, Noise)
  • [x] Markup (Drawing, Text, Sticker)

Requirements

  • iOS 16+
  • XCode 15+
  • Swift 5.9+

Installation

Swift Package Manager

You can install SSImageKit using [Swift Package Manager] by:

  1. Go to Xcode -> File -> Add Package Dependencies...
  2. Add package URL [https://github.com/SimformSolutionsPvtLtd/SSImageKit][SSImageKit]

CocoaPods

[CocoaPods][CocoaPods.org] is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

Navigate to project root folder to integrate pod.

$ pod init

It will generate Podfile for your project. To integrate SSImageKit into your project specify it in your Podfile:

platform :ios, '17.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'SSImageKit'                # Full library with Engine + UI components
    # pod 'SSImageKit/Engine'       # Engine only (for custom UI implementations)
end

Then, run the following command:

$ pod install

It will generate <Project>.xcworkspace file. From now on you should open the project using this file.

<details> <summary><h4> Script Sandboxing Error</h4></summary>

If you face build error Command PhaseScriptExecution failed with a nonzero exit code then follow this steps:

Go to project Build Settings -. Search for User Script Sandboxing -> Set to No.

Refrence - [User Script Sandboxing] </details>

Usage

SSImageKit provides two installation options:

1. Full Library (pod 'SSImageKit')

Complete image editing solution with both engine and ready-to-use UI components.

2. Engine Only (pod 'SSImageKit/Engine')

Core image processing engine for developers who want to build custom UI.


SSImageKit contains two modules:

  • SSImageKitEngine - Core component for editing images
  • SSImageKit - Provides UI for image editing using SSImageKitEngine

Quick Start with Full Library

First import the package:

import SSImageKit
Option 1: Complete Image Picker with Editor

For using SSImageKit with built-in Image Picker use SSIKImagePicker.

First create image for binding:

@State var image: PlatformImage?
SSIKImagePicker(image: $image) { // Binding of image
    Text("Pick Image")  // Label for picker
        .clipShape(RoundedRectangle(cornerRadius: 20))
}

SSIKImagePicker takes two arguments:

  • Image binding which will be updated when user saves image after editing
  • Label to display in place of picker
Option 2: Editor Only

If you just want the editor then use SSIKEditorView.

First create image for binding and presentation:

@State private var image: PlatformImage = .snape // Image to edit
@State private var isPresented: Bool = true
GeometryReader { proxy in
    SSIKEditorView(image: $image, isPresented: $isPresented, previewSize: proxy.size)
}

Using Engine Only

If you installed only the engine (pod 'SSImageKit/Engine'), import just the engine:

import SSImageKitEngine // For SPM
// or
import SSImageKit // For Cocoapods

Then you can use the core editing capabilities to build your own UI:

let engine = SSImageKitEngine()
// Apply filters, adjustments, crops, etc.
// Build your custom UI around the engine

Customization

For customizing SSImageKit please refer [Customization Guide].

Find this samples useful? :heart:

Support it by joining [stargazers] :star: for this repository.

How to Contribute :handshake:

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle: \ Check out our [Contributing Guide] for ideas on contributing.

Bugs and Feedback

For bugs, feature feature requests, and discussion use [GitHub Issues].

Other Mobile Libraries

Check out our other libraries [Awesome-Mobile-Libraries].

License

Distributed under the MIT license. See [LICENSE] for details.

[Banner]: https://github.com/user-attachments/assets/84e71174-38f3-4cd1-9780-53d50f73f049

[SSImageKit]: https://github.com/SimformSolutionsPvtLtd/SSImageKit

[Swift Package Manager]: https://www.swift.org/package-manager

[Swift Package Index]: https://swiftpackageindex.com/SimformSolutionsPvtLtd/SSImageKit

[CocoaPods]: https://cocoapods.org/pods/SSImageKit

[CocoaPods.org]: https://cocoapods.org/

[User Script Sandboxing]: https://github.com/CocoaPods/CocoaPods/issues/11946#issuecomment-1587846325

[Release]: https://github.com/SimformSolutionsPvtLtd/SSImageKit/releases/latest

[Customization Guide]: docs/Customization.md

[stargazers]: https://github.com/SimformSolutionsPvtLtd/SSImageKit/stargazers

[Contributing Guide]: CONTRIBUTING.md

[Github Issues]: https://github.com/SimformSolutionsPvtLtd/SSImageKit/issues

[Awesome-Mobile-Libraries]: https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries

[license]: LICENSE

[Platform Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSImageKit%2Fbadge%3Ftype%3Dplatforms

[Swift Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSImageKit%2Fbadge%3Ftype%3Dswift-versions

[Release-badge]: https://img.shields.io/github/v/release/SimformSolutionsPvtLtd/SSImageKit

[License Badge-badge]: https://img.shields.io/github/license/SimformSolutionsPvtLtd/SSImageKit

[Pod Version-badge]: https://img.shields.io/cocoapods/v/SSImageKit

[SPM Compatible-badge]: https://img.shields.io/badge/Swift_Package_Manager-compatible-coolgreen

Package Metadata

Repository: simformsolutionspvtltd/ssimagekit

Default branch: master

README: README.md