Skip to content

Instantly share code, notes, and snippets.

View unixb0y's full-sized avatar
👨‍💻
Hacking

Dave unixb0y

👨‍💻
Hacking
  • Planet Earth
View GitHub Profile
@unixb0y
unixb0y / UIImage+Orientation.swift
Created March 4, 2019 02:26 — forked from nRewik/UIImage+Orientation.swift
UIImage fix orientation ( rotate pixel rather than relying on exif ) -- Swift 4, no force unwraps
import UIKit
extension UIImage {
func fixOrientation() -> UIImage {
guard let cg = cgImage, let cg_colorspace = cg.colorSpace else {
print("Error while fixing image orientation")
return self
}
@unixb0y
unixb0y / RBResizer.swift
Created April 14, 2017 15:21 — forked from licvido/RBResizer.swift
SWIFT: Crop image to square (& resize)
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
//
import UIKit