Image resizing while maintaining the aspect ratio (downsizing) #3228
Unanswered
alexey-leonovich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I have a function which resizes an image while maintaining the aspect ratio. For example if I need to resize 5760x3840 image to maximum 480x480 pixels - resized image would be 480x320. I use the following code (I use latest SkiaSharp 3.116.1):
PreserveAspectRation
or something not to calculate scaledWidth and scaledHeight manually?Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions