Sign in to follow this  
ms75214

original width of a DirectX texture

Recommended Posts

Is there any way to find the original width of a DirectX texture image? For instance, if an image is 541 pixels wide but gets scaled to 1024,

I want to get the 541.

Share this post


Link to post
Share on other sites
How did the image get scaled? Generally if you scale it, you know the size beforehand.

Note that scaling at runtime is different than resizing at load time, if that's what you really mean.

Share this post


Link to post
Share on other sites
I think what he's saying is that when he applies the sprite as a texture to a quad it gets scaled because it is close to the camera and the projection gets larger then the original resolution. Think changing the camera to Orthographic projection will do the trick. Don't know how to actually do it though.

Share this post


Link to post
Share on other sites
actually it sounds like he's saying if he loads an image, but puts in a different texture size (automatically scaling it), can he get the original dimensions back, in which case no. If I'm wrong about your question, I apologize.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this