SwiftyImageIO 0.3.0

SwiftyImageIO 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2016
SPMSupports SPM

Maintained by Belyavskiy Alexander.


Downloads

Total950
Week0
Month0

Installs

Apps43
Test Targets6
powered by Segment

GitHub

Stars7
Watchers2
Forks2
Issues0
Contributors1
Pull Requests0

Code

Files5
LOCLines of Code 396


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