在图片框中显示Photoshop文件(任何DDS) [英] Display a Photoshop File (any DDS) in a picturebox

查看:76
本文介绍了在图片框中显示Photoshop文件(任何DDS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用CSharp方法在图片框中显示Photoshop文件(.DDS)?

我在Google上搜索它并尝试了几个库和一些无法加载的自定义例程DDS在一个图片框中。使用imagedds.cs类文件时,我的图像格式无效。 dds图像有效,可以由其他程序加载。你知道这样做的可行方法吗?



同时我发现了两件事,但没有一件好用:



DevILDotNet_1.3 - 当我尝试加载DDS文件时,给我一个无效的win32应用程序的例外。我的DDS文件都无法加载。



DDSImage_0.3 - 加载一些DDS而不会出错。无法加载大多数DDS并提供没有有效图像文件的文件格式例外。第三方程序可以显示DDS,因此文件看起来有效。



是否有任何(免费)库可以与所有DDS一起使用,或者至少可以使用命令行工具将DDS转换为我可以显示它的普通文件?

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?

推荐答案

请注意,PhotoShop文件与.DDS文件格式无关,这是一种Microsoft格式在XNA中使用。



此时将.DDS文件导入PhotoShop需要使用第三方转换器:搜索photoshop create .dds文件以查看可用的内容,现在。



nVidia为PhotoShop和.DDS文件之间的互操作提供了一些工具:[ ^ ]。



看看其他人有什么完成.NET .DDS文件,从这里开始:[ ^ ]
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: [^]


PictureBox只能显示可由Image类加载的文件,这些文件不支持任何格式...( https://msdn.microsoft.com/en-us/library/system.drawing。 imaging.imageformat.aspx [ ^ ])。

如果您使用的外部库无法加载您的DDS文件,您应该连接写一个库的那个,但请记住DDS有几种风格,并不是所有的库都支持所有这些...
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...


这篇关于在图片框中显示Photoshop文件(任何DDS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆