Post

Replies

Boosts

Views

Activity

Reply to ImageRenderer on iOS - generates blurry image, .scale ineffective?
Super weird....I had a similar problem. using ShareLink to send an image use ImageRenderer to generate image when converting from UIImage directly to Image the one that would "send" was fuzzy below is the code I used to fix it like the comment above. @MainActor func render() {     let renderer = ImageRenderer(content: viewToPost)     renderer.scale = 3     if let uiImage = renderer.uiImage {       let data = uiImage.pngData()       var fullImage = UIImage(data: data!)       self.postImage = Image(uiImage: fullImage!)       UIImageWriteToSavedPhotosAlbum(uiImage, nil, nil, nil)     }   } for some reason if I don't convert into a new UIImage from the png data then the resulting image is fuzzy. Can someone with any insight comment? I like having a solution, but it keeps me up at night not UNDERSTANDING it.
Dec ’22