Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Resizing image with xna

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 MisteRnoOrOnha   Members   

241
Like
0Likes
Like

Posted 25 January 2013 - 07:15 AM

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?



#2 phil_t   Members   

8001
Like
0Likes
Like

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.


#3 MisteRnoOrOnha   Members   

241
Like
0Likes
Like

Posted 25 January 2013 - 11:06 AM

How i use the SamplerState.PointClamp?



#4 Havsmonstret   Members   

975
Like
0Likes
Like

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):
http://msdn.microsoft.com/en-us/library/ff433699.aspx

Edited by Navall, 25 January 2013 - 11:39 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.