I need to load XNA.Texture2D into a PictureBox.
I tried this: http://www.gamedev.net/community/forums/viewreply.asp?ID=3224621 , but it does not work. Any suggestions?
You should use this method, but make sure your XNA Texture2D is created in 32bbpARGB format. Any other format will prevent the direct operation of this method.
An easier way to do this is to save Texture2D using Texture2D.SaveAsPng or Texture2D.SaveAsJpeg into the memory stream and open the virtual file using Bitmap(Stream) .
Texture2D.SaveAsPng
Texture2D.SaveAsJpeg
Bitmap(Stream)
Source: https://habr.com/ru/post/1442870/More articles:Prepared PDO Report on ODBC Sybase Error "PARAM datastream" - phpIs there a way to resize an image using a GPU? - c #I want to use Texture2d as system.drawing.bitmap - c #OCaml Analysis Function - parsingHow to compile PHP source code in PHP 5.4 - phpCapistrano: unable to access ~ / releases /: no such file or directory - ruby-on-railsPy2app error for opencv / macports application. How to compile opencv with headerpad_max_install_names flag? - pythonTSQL Enter default column value from Case Statement - sqlAccess to the original property value from `__defineGetter__` - javascriptLazy-Eval Injection for Value Provider (Unity, Structure Map, Ninject ...) - c #All Articles