Swiftpack.co -  AnyImageProject/AnyImageKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
AnyImageProject/AnyImageKit
A toolbox for pick/edit/capture photo or video. Written in Swift.
.package(url: "https://github.com/AnyImageProject/AnyImageKit.git", from: "0.13.2")

AnyImageKit

GitHub Actions CocoaPods Compatible Carthage Compatible Platform License

AnyImageKit is a toolbox for picking, editing or capturing photos/videos, written in Swift.

中文说明

Features

  • ☑ Modular design
    • ☑ Picker
    • ☐ Browser
    • ☑ Editor
    • ☑ Capture
  • ☑ Light mode, dark mode or auto mode support
  • ☑ Default theme is similar with Wechat
  • ☑ Multiple & mix select support
  • ☑ Supported media types:
    • ☑ Photo
    • ☑ GIF
    • ☑ Live Photo
    • ☑ Video
  • ☑ Camera
    • ☑ Photo
    • ☑ Video
    • ☐ Live Photo
    • ☐ GIF
    • ☐ Fliter Support
  • ☐ Edit image ( Technical Preview )
    • ☑ Drawing
    • ☐ Emoji
    • ☑ Input text
    • ☑ Cropping
    • ☑ Mosaic
    • ☐ Rotate
    • ☐ Fliter Support
  • ☑ Multiple platform support
    • ☑ iOS
    • ☑ iPadOS
    • ☑ Mac Catalyst ( Technical Preview, Not support in editor.)
    • ☐ macOS
    • ☐ tvOS
  • ☑ Internationalization support
    • ☑ English (en)
    • ☑ Chinese, Simplified (zh-Hans)
    • ☑ Turkish (tr)
    • ☐ and more... (Pull requests welcome)

Requirements

  • iOS 10.0+
  • Xcode 12.4+
  • Swift 5.3+

Installation

Swift Package Manager

⚠️ Needs Xcode 12.0+ to support resources and localization files

dependencies: [
    .package(url: "https://github.com/AnyImageProject/AnyImageKit.git", .upToNextMajor(from: "0.13.0"))
]

CocoaPods

Add this to Podfile, and then update dependency:

pod 'AnyImageKit'

Carthage

Add this to Cartfile, and then update dependency:

github "AnyImageProject/AnyImageKit"

⚠️ Unsupport in Xcode 12.0, more details

Usage

Prepare

Add these keys to your Info.plist when needed:

Key Module Info
NSPhotoLibraryUsageDescription Picker
NSPhotoLibraryAddUsageDescription Picker
PHPhotoLibraryPreventAutomaticLimitedAccessAlert Picker Set YES to prevent automatic limited access alert in iOS 14+ (Picker has been adapted with Limited features that can be triggered by the user to enhance the user experience)
NSCameraUsageDescription Capture
NSMicrophoneUsageDescription Capture

Quick Start

import AnyImageKit

class ViewController: UIViewController {

    @IBAction private func openPicker(_ sender: UIButton) {
        var options = PickerOptionsInfo()
        /*
          Your code, handle custom options
        */
        let controller = ImagePickerController(options: options, delegate: self)
        present(controller, animated: true, completion: nil)
    }
}

extension ViewController: ImagePickerControllerDelegate {

    func imagePickerDidCancel(_ picker: ImagePickerController) {
        /*
          Your code, handle user cancel
        */
        picker.dismiss(animated: true, completion: nil)
    }
    
    func imagePicker(_ picker: ImagePickerController, didFinishPicking result: PickerResult) {
        let images = result.assets.map { $0.image }
        /*
          Your code, handle selected assets
        */
        picker.dismiss(animated: true, completion: nil)
    }
}

Release Notes

Version Release Date Xcode Swift iOS
v0.13.0 2021-02-08 12.4 5.3 10.0+
v0.12.0 2020-12-30 12.2 5.3 10.0+
v0.11.0 2020-12-18 12.2 5.3 10.0+
v0.10.0 2020-11-03 12.1 5.3 10.0+
v0.9.0 2020-10-09 12.0 5.3 10.0+

License

AnyImageKit is released under the MIT license. See LICENSE for details.

GitHub

link
Stars: 376
Last commit: 4 days 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.

Dependencies

Release Notes

Improve Editor, Happy Chinese New Year!
25 weeks ago

更新说明

General

  • AnyImageKit now support resource_bundles for CocoaPods.(#79)
  • Added Turkish (tr) internationalization support.(#70)

New Features

  • Editor
    • The output workflow has been refactored so that editing now does not reduce the resolution of the original image.(#67)

Resolved

  • Core
    • Fixed the issue that AnyImageError.invalidExportPreset is thrown when setting HEVC/H.265 output with devices below A10 chip, and the unsupported devices will be downgraded to AVC/H.264 solution automatically.(#75)
    • Fixed the issue that the status bar is not hidden correctly on iPhone8/8 Plus and older device.(#78)
  • Capture
    • Fixed the issue that Metal resource files were not copied when using CocoaPods as a static library dependency.(#81)

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