Swiftpack.co - Package - diejmon/SwiftyImageIO

SwiftyImageIO

Swift SPM Ready Build Status Version License Platform Carthage compatible codebeat badge

Swift wrapper around ImageIO framework.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Examples

Create image thumbnail

import SwiftyImageIO

let source = ImageSource(data: imageData, options: nil)
let thumbnailCGImage = source?.createThumbnail(maxPixelSize: thumbnailSize)

Write image to disk

import SwiftyImageIO
import MobileCoreServices

if let imageDestination = ImageDestination(url: saveURL, UTI: kUTTypeJPEG, imageCount: 1) {
  imageDestination.addImage(cgImage)
  let imageSaved = imageDestination.finalize()
}

Installation

CocoaPods

pod "SwiftyImageIO"

Swift Package Manager

dependencies: [
    .Package(url: "https://github.com/diejmon/SwiftyImageIO.git", majorVersion: 0, minor: 3)
]

Carthage

github "diejmon/SwiftyImageIO" ~> 0.3

Author

Alexander Belyavskiy, diejmon@gmail.com

License

SwiftyImageIO is available under the MIT license. See the LICENSE file for more info.

Github

link
Stars: 10
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.2.0 - May 21, 2016

  • Remove Swift 3.0 support
  • Add Xcode project
  • Introduce UTI type for better public API usage