My problem surface, when I need to add image file, say texture1.dds to my game project.
WindowsGame1
Add
Existing Item...
then from the dialog I select
Files of type
Image Files (*.gif,*.jpg,*.jpe,*.png,*.bmp,*.dib,*.tif,*.wmf,*.raw)
So my problem is missing image file type *.dds. DX Tool creates it and is supported by XNA Texture2D.FromFile(). Is there published solution avaible or should I change with hexeditor for example *.jpe (never seen jpeg files with this extension) to *.dds If I hard code extension, then where lives dialog recource
Any comments will do
Peca

Image File Extension .dds
PaulYuk_MS
Of course File Name only contains the file name.
Check the Full Path property (see link). And the Add New Item does contain an All Files selection (see the link below).
http://home.comcast.net/~machaira/fullpath.JPG
http://home.comcast.net/~machaira/allfiles.JPG
BJHop
Hawkson
Sorry, but drag&drop don't work. If you look "File Name" property, you see only pure file name without path. When you try to build project, compiler can't find your dropped file if it's not in your project foulder initially!
Peca
DaPosh
Yes, I have.
I don't understand what you're saying. I created a new project, dragged a texture file (dds file) into the project from another, set the "Copy to Output Directory" to "Copy Always", added the following code:
private SpriteBatch _batch; private Texture2D _sprite;//add to the game object's constructor
_batch =
new SpriteBatch(this.graphics.GraphicsDevice);_sprite =
Texture2D.FromFile(this.graphics.GraphicsDevice, "sprites.dds");//add to the game's Draw method:
_batch.Begin(
SpriteBlendMode.AlphaBlend);_batch.Draw(_sprite,
new Rectangle(0, 0, 128, 128), new Rectangle(0,0,128,128), Color.White);_batch.End();
and it worked just fine. I did save the project after adding the code however. You won't get the FullPath project until then because, of course, there is no path until you save it. It's all in memory.
beechum1
Sounds easy, but there is no such a option as "All Files". Try to use dialog youself and then throw something useful idea!
Peca
Fuzon
tempgp
allison_h
I just say "Add Existing Item" Then in the File name field type "*.*" and click Open. Now you'll see everything.