If I want the above code to work, I have to declare a new texture with a fixed size and fit the image in, but the dimension of the original image will be stretched/distorted. Is there a way to grab to original height/width of the image either from the byte array or from the post-fitting texture? Thank you so much for your help!
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
Have you looked at the example code in the docs for LoadImage()?
It is also pretty specific about what happens to the texture going in.
1 Like
Just so you know, the 2D forums are not really for General Graphics questions. Texture2D isn’t a 2D feature.
There’s dedicated sub-forum for that here.
Also, please read above about using code-tags rather than posting images of code.
1 Like