Skip to content

elihwyma/Swift-QOI

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Swift-QOI

Swift implementation of the QOI Format. Contains extensions for AppKit and UIKit to integrate into your projects with ease.

Documentation

// Convert a UIImage/NSImage/CIImage to QOI Data
let image = UIImage(named: "ExamplePNG")!
let encoded = QOICoder.convert(from: image) // Returns Data

// Load a QOI Image from Data to UIImage/NSImage/CIImage
let imageURL = Bundle.main.url(forResource: "TestImage", withExtension: "qoi")!
let data = try! Data(contentsOf: imageURL)

// UIImage
let uiImage = UIImage(qoiData: data)
// or // 
let uiImage = UIImage(qoiURL: imageURL)

// NSImage
let nsImage = NSImage(qoiData: data) 
// or // 
let nsImage = NSImage(qoiURL: imageURL)

// CIImage 
let ciImage = QOICoder.decode(from: data)

License

  • Swift-QOI is licensed under MIT
  • qoi.h is licensed under MIT

About

Swift implementation of the QOI Format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published