Hi ladies and gentlemans, now i'm here do ask how can i resize an image in XNA without lose quality? I'm use the draw method but the image appears on screen with a giant blur, how can i remove this?
Resizing image with xna
Crossbones+ - Reputation: 6569
Posted 25 January 2013 - 07:19 AM
Are you making the image bigger or smaller?
How are you drawing the image?
What SamplerState are you using?
Edit: If you're trying to enlarge a small image and keep sharp pixel edges, you need to use point sampling. (SamplerState.PointClamp or SamplerState.PointWrap).
Edited by phil_t, 25 January 2013 - 07:21 AM.
Members - Reputation: 598
Posted 25 January 2013 - 11:39 AM
How i use the SamplerState.PointClamp?
You set it in the Begin method of your SpriteBatch (the third argument):
Edited by Navall, 25 January 2013 - 11:39 AM.