Closed Maxador closed 3 years ago
Is there a way to render the bitmap to a certain height without requesting a width while keeping the aspect ratio of the image?
Sounds like a new feature request. Can't you pre-calculate the size of length and disable the aspect ratio ?
If you can't, we have to provide some new options, or even like a calculation size block
closure for advanced use case.
If I try to render an SVG with a bigger size than the SVG file is setting, the image will render blurry. I tried to use the solution proposed in https://github.com/SDWebImage/SDWebImageSVGCoder/issues/24 but without success. I had it kinda working by setting values to my
CGSize
like this[.imageThumbnailPixelSize : CGSize(width: 34, height: 34)]
but unfortunately not all my images are square and I don't want to constraint the width.SwiftUI Rendering code
Is there a way to render the bitmap to a certain height without requesting a width while keeping the aspect ratio of the image?