Skip to content

Instantly share code, notes, and snippets.

View JiteshBharadiya's full-sized avatar

JiteshBharadiya

  • India
View GitHub Profile
@mabuak
mabuak / fixed_image_orientation.swift
Created November 6, 2018 07:30
Fixed Image Orientation Swift 4.2
// Fix Image Orientation
func fixImageOrientation(image:UIImage) -> UIImage
{
UIGraphicsBeginImageContext(image.size)
image.draw(at: .zero)
let newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return newImage ?? image