For those independent XNA game developers who find this post via Google, I hope I can help with a problem I've seen talked about in a few places on the 'net.
In the game I am currently working on, I have a need to load a bunch of bitmaps into memory, and then I need to turn those bitmaps into texture objects. I'm using a blend of GDI+ and XNA in my application, you see. Previously, when I was using MDX in conjunction with GDI+, this was no problem because there was a direct conversion available. Since XNA is dual-targeted at both the 360 and the Windows platforms, there isn't a conversion available.
On various forums I've seen solutions batted about relating to doing a per-pixel copy of the images from one format to the other (often using Bitmap.GetPixel, which is horribly slow -- you're much better off using Bitmap.LockBits, but even that is not nearly ideal).
The solution I have is simply relating to memory streams, since a Bitmap can be saved to a stream, and a Texture2D can be loaded from a stream. This approach might seem like a waste of memory, but it's the most processor-efficient way to do this. My game is able to process several dozen 28x28 images in under two seconds using this approach. The trick is to do the conversions just in little bits, as you need the images, rather than doing them all up front (which would take forever, and really give the garbage collector fits). I leave that part up to you. Here's the C# code for the actual conversion, which is quite simple:
Bitmap b = new Bitmap( nameOfFile );
Texture2D tx = null;
using ( MemoryStream s = new MemoryStream() )
b.Save( s, System.Drawing.Imaging.ImageFormat.Png );
s.Seek( 0, SeekOrigin.Begin ); //must do this, or error is thrown in next line
tx = Texture2D.FromFile( GraphicsDevice, s );
That's all there is to it!
(Added point of interest: It seems that XNA is unable to load GIF files -- presumably a licensing thing, knowing GIF -- but of course regular .NET is able to load those just fine. Using this sort of code provides a way for you to load GIFs or any other format that .NET supports but that XNA does not into XNA Texture2D objects. This is handy for me, because at present my project has... uh... just over 8,500 GIF files in it.)