I’m looking for the easiest and most efficient way to convert a SwiftUI Image to Data so that I can store it in SwiftData.
let image: Image
let data: Data = GetImageData(image: image)
How would I implement the GetImageData function above?
I have found examples of how to do so with UIImage but not Image.