How would you create an JPEG image from a regular iPhone picture, which is in HEIC/HEIF format?
let heicImage = inputImage //inputImage is a picture that comes directly from PhotoLibrary
let data = heicImage!.jpegData(compressionQuality: 1.0)
FileManager.default.createFile() //And here is my problem. I don't know how to give it a path
let jpgImage = UIImage() //And here would be the image in JPEG
The problem is that my code needs a JPEG. And if the user use a HEIF picture from iPhone my app does not work. But if the user use a JPEG, the app would convert the JPEG to Data and Data to JPEG, so my app does not need to control if the picture is a JPEG or not.
Thank you.