All Projects → S2Ler → SwiftyImageIO

S2Ler / SwiftyImageIO

Licence: MIT License
A swift wrapper around ImageIO framework

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to SwiftyImageIO

brazil-ios-utils
🇧🇷 Utils libraries for specific use cases / business in Brazil
Stars: ✭ 31 (+121.43%)
Mutual labels:  swift-wrapper
quadart
Python module for producing quad-tree art
Stars: ✭ 33 (+135.71%)
Mutual labels:  imageio
SKQueue
Monitor changes to files and directories using kernel event notifications (kqueue) in Swift
Stars: ✭ 86 (+514.29%)
Mutual labels:  swift-wrapper
DIP-In-Python
Play around with Pixel in Python
Stars: ✭ 42 (+200%)
Mutual labels:  imageio
Swift-WebP
A thin Swift wrapper of libwebp to make your own encoder/decoder app
Stars: ✭ 135 (+864.29%)
Mutual labels:  swift-wrapper
napari-aicsimageio
Multiple file format reading directly into napari using pure Python
Stars: ✭ 18 (+28.57%)
Mutual labels:  imageio
webp-imageio
Java ImageIO WebP support
Stars: ✭ 135 (+864.29%)
Mutual labels:  imageio
Timliu Ios
iOS开发常用三方库、插件、知名博客等等
Stars: ✭ 10,898 (+77742.86%)
Mutual labels:  swift-wrapper

SwiftyImageIO

Swift SPM Ready Version License Platform Carthage compatible

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

Create GIF from animated UIImage

let gifMaker = GIF()
try gifMaker.makeGIF(fromAnimatedImage: animatedImage,
                     writeTo: savePath,
                     properties: GIF.Properties(loopCount: 1),
                     frameProperties: GIF.FrameProperties(delayTime: 0.1))

Read GPS image properties

let source = ImageSource(url: jpgWithExifImageURL, options: nil)
guard let properties = source?.propertiesForImage() else {
  XCTFail("We created image without properties.");
  return
}
guard let gpsProperties = properties.get(GPSImageProperties.self) else {
  XCTFail("GPS Not available")
  return
}

Test examples

Test Examples

Installation

CocoaPods

pod "SwiftyImageIO"

Swift Package Manager

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

Carthage

github "diejmon/SwiftyImageIO" ~> 0.4

EXIF

The list of exif values can be found in this document

Author

Alexander Belyavskiy, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].