Click here to Skip to main content
15,885,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How would I display a Photoshop File (.DDS) in a picturebox with CSharp methods?
I searched for it on Google and tried few libraries and some custom made routines which were unable to load the DDS in a picturebox. I got exception of invalid image format with using a imagedds.cs class file. The dds image is valid and can be loaded by another program. Do you know a solid way of doing this?

Meanwhile I have found two things but none of them worked well:

DevILDotNet_1.3 - Gives me an exception that "no valid win32 application" when I try to load the DDS file. None of my DDS files can be loaded.

DDSImage_0.3 - Loads some DDS without error. Most DDS can't be loaded and give an File Format Exception of no valid Image File. A third party program can display the DDS so the file looks valid.

Is there any (free) library which works with all DDS or at least a commandline tool which could convert the DDS to a normal file that I could display it?
Posted
Updated 3-Mar-15 1:29am
v2
Comments
RedDk 2-Mar-15 14:10pm    
Stackoverflow is always a good place to start because it offers a wide range of questions from experienced laymen and not-so-experienced laymen both. The idea that "the dds image is valid" speaks volumes to fact that just looking at an image using whatever tool seems to do the job doesn't address the concept of "versioning" very well.

Add this site to the reading too:

http://www.buckarooshangar.com/flightgear/tut_dds.html

Note that a PhotoShop file has nothing to do with the .DDS file format which is a Microsoft format used in XNA.

At this time import of .DDS files into PhotoShop requires using a third-party converter: do a search on "photoshop create .dds file" to see what's available, now.

nVidia provides some tools for inter-op between PhotoShop and .DDS files: [^].

To see what other people have done with .NET .DDS files, start here: [^]
 
Share this answer
 
PictureBox can display only files that can be loaded by the Image class that has no support to any format...(https://msdn.microsoft.com/en-us/library/system.drawing.imaging.imageformat.aspx[^]).
If you are using an external library that unable to load your DDS file, you should connect the one wrote that library, but remember that DDS has several flavors and not all libraries support all of them...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900