Hey everyone. Hope you are having a good day.
I have been trying to find a way to resize a sprite whenever I call loading an image from a URL. Been having a hard time grasping this concept for a good while.
I want to load the image into the sprite, resize it to fit a mobile phone screen size. I know how to resize to the screen, but it gets all skewed and the actual image dimensions get messed up and the image doesn't look right. So how could I approach resize the image based on its dimensions, but still be able to fit the screen size(mobile)?
I tried using the Sprite.ImageHeight and ImageWidth checks, I think I am on the right path, but not total for sure.
This would have been an easy fix by hard coding the right size, but the images will be dynamic via user uploads. So I have to think of a dynamic scaling system.
Thank you for your time!
Edit: I have gotten close to getting this working however this aspect ratio just does not meet my requirements.