   Alpha channel screenshots
  I have a texture I have rendered a scene to, when I clear the scene I clear with argb(0,0,0,0) and then only render a single mesh that does not occupy the whole viewport.  The texture has an alpha channel (not X), when I save the surface of this texture to a stream and then load the stream into a bitmap, I lose the alpha channel.I have tried saving the surface to a file (tga/bmp/png) and then loading the file, with no luck (if I open the tga and bmp in photoshop they have alpha channels, except they don't seem to be applied).So the question is:Does anyone know a way to convert a surface or a texture into a BitMap object with a PixelFormat of 32bppARGB?   
  Do you create your device with A8R8G8B8 or X8R8G8B8?  You'll need to ensure you have alpha in the backbuffer.  Now you *should* be good to go, except...This was reported as bug recently... that SaveSurfaceToFile doesn't include alpha information.  Apparently it's been fixed, but I don't remember if it's fixed in the December DXSDK for scheduled for February's release.  If you don't need it right away, just wait for the new SDK.  If you do need it, you might have to lock the backbuffer, and write out a TGA file yourself (a non compressed TGA writer should be fairly easy to make).  Check here for file format details.; I'm assuming this is unmanaged DX Are you using D3DXSaveSurfaceToFile? If not, it should work.Also, Photoshop handles alpha channels quite a bit differently than other applications do, and it usually doesn't apply alpha created in a seperate application correctly. Have you tried opening your surface with the DX texture tool and selecting "Show alpha channel only"?Hope this helps.[EDIT] Got beat to the punch :(. At any rate, I'd recommend trying the DX texture tool first, as the whole check would take less than 3 minutes :)   ;  It is managed but I'm not adverse to unsafe code.I am creating my device backbuffer with X8 because A8 isn't supported, or I can't seem to get it to create a device with an alpha backbuffer. but I'm not capturing the backbuffer surface, I'm creating a A8 texture and using it as a render target.When I save the file as a TGA or BMP using SurfaceLoader.SaveToFile I do have alpha channels (just using photoshop to check it, it created a proper mask... so there is a distinction, but it didn't apply that mask).  But if I load that file as a BMP it is a 24bppRGB. Edit- So texture tool or not, I do know the file itself has info about alpha.. it just doesn't use that info when I create a "New BitMap" passing either the file I just saved or the stream from SurfaceLoader.SaveToStream.When I get home I'll post my code, sorry I didn't label this MDX but really I'd be happy with a solution on either end.  I want to be able to create a 32bppARGB GDI+ bitmap file from a surface in DX.   ;  So I'll include the relevant code if any of you can give me an idea.rtsScreen = New RenderToSurface(dvcPrimary, Me.Width, Me.Height, Format.A8R8G8B8, True, DepthFormat.D16)   texScreen = New Texture(dvcPrimary, Me.Width, Me.Height, 1, Usage.RenderTarget, Format.A8R8G8B8, Pool.Default)   surfScreen = texScreen.GetSurfaceLevel(0)Then I render my scene to rtsScreen, and surfScreen has a description.format of A8R8G8B8  if I Save to tga, dds, and bmp they are A8R8G8B8 files, and load in the textureviewer as such.  If I save it to png it loses the alpha channel.More important to what I'm trying to do, I cannot load any of the alpha into a System.Drawing.Bitmap, if I load the bmp it loads as 32bppRgb.  If I load the png it's 24bppRgb, tga and dds cannot be loaded by System.Drawing (parameter errors).  Doesn't matter if I save them to disk or use the stream from the surfScreenAny help would be appreciated.  Hopefully it's just the mentioned bug (although the only file type that's not saving alpha seems to be png), I was hoping I wouldn't have to do something like manually parse a tga file   