SwiftyImageIO 0.3.0

SwiftyImageIO 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2016
SPMSupports SPM

Maintained by Belyavskiy Alexander.



  • By
  • Alexander Belyavskiy

SwiftyImageIO

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()
}

Requirements

Installation

SwiftyImageIO is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SwiftyImageIO"

Author

Alexander Belyavskiy, [email protected]

License

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