SwiftyImageIO
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, diejmon@gmail.com
License
SwiftyImageIO is available under the MIT license. See the LICENSE file for more info.