         return image
     }
     
+    @available(*, deprecated, message: "Use resizedImage(newSize:, quality:) instead")
     func imageByScalingAndRotating(maxSize: CGFloat) -> UIImage? {
         guard let imageRef = self.cgImage else { return nil }
         let width: CGFloat = CGFloat(imageRef.width)

        
        return imageCopy
    }
}

//
// Created by swoolcock on 11/11/2016.
//
// Contains a partial port of http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
// https://gist.github.com/bgreenlee/c81b169cfb8337ce5140
// Updated for Swift 4+
//

import Foundation
import UIKit
import CoreGraphics

public extension UIImage {
    static func coloredImage(color: UIColor, size: CGSize? = nil) -> UIImage? {
