Skip to content

SimformSolutionsPvtLtd/SSImageKit

Repository files navigation

SSImageKit

SSImageKit

Swift Compatibility-badge Platform Compatibility-badge Release-badge License Badge-badge Pod Version-badge SPM Compatible-badge

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 integrating with your application for a seamless and intuitive user experience.

Overview Crop & Rotation Adjustment
Markup Filters Details

Features

  • Customizable components
  • Crop & Rotation with custom ratio
  • Light adjustment (Brightness, Contrast, Saturation, Hue)
  • Blur
  • Default & Custom Filter
  • Detail (Sharpness, Noise)
  • 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

CocoaPods

CocoaPods 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.

Script Sandboxing Error

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

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? ❤️

Support it by joining stargazers ⭐ for this repository.

How to Contribute 🤝

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! 💪
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.

About

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.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors