All the code I can find revolves around loading images directly into visual controls.
However, I have my own cache system (converting a project from another language
Per the documentation at: https://developer.apple.com/documentation/uikit/uiimage
let uiImage = uiImageView.image let cgImage = uiImage.cgImage