I am unable to rotate the image by 90 degrees in swift. I have written below code but there is an error and doesn\'t compile
func imageRotatedByDegrees(old
UIGraphicsBeginImageContext(CGSize(width: bitmap.width, height: bitmap.height)) UIImage(cgImage: oldImage.cgImage, scale: 1, orientation: .leftMirrored).draw(at: .zero) let image = UIGraphicsGetImageFromCurrentImageContext()!
Much shorter.