SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.18k stars 224 forks source link

Corner Radius does not work properly in case of AnimatedImage #317

Closed nikhil-kumar-meesho closed 3 months ago

nikhil-kumar-meesho commented 4 months ago

var body: some View { AnimatedImage(url: viewData.viewImageUrlString) .resizable() .scaledToFit() .cornerRadius(8) }

I am using this code to add a corner radius to the image but the corner radius does not look smooth. It works in the case of WebImage.

Screenshot 2024-05-24 at 12 31 50 PM
dreampiggy commented 4 months ago

This is the UIKitRepresentable view. You can just use the clipShape or UIView.maskToBounds to force the render tree to contains the clip

dreampiggy commented 3 months ago

Please try again with version 3.1.0