如何使用C#将图像文件.DGN转换为.PIX [英] How to convert a image file .DGN to .PIX using C#

查看:104
本文介绍了如何使用C#将图像文件.DGN转换为.PIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我不是在寻找任何第三方工具,而是想以编程方式进行操作.

请在这方面指导我.

在此先感谢.

Hi, I am not looking for any third party tools, want to do programatically.

Please guide me in this regard.

Thanks in Advance.

推荐答案

如果无法通过Image对象完成此操作,则必须手动执行.大致来说,该过程是:
-创建一个数据类,该数据类表示要保留的文件的内部语义结构
-编写一个采用输入格式(在您的情况下为DGN)并将数据信息提取到数据类实例中的数据读取器
-编写一个数据编写器,该数据编写器将使用您的数据类的实例并创建目标输出格式(PIX)的文件.

显然,这需要文件格式公开化或易于逆向工程,并且这两种文件格式都必须能够存储您关心的语义信息.空间信息是相对专业的事情,您应该首先检查是否可以将其存储在PIX文件中.
If you can''t do it through the Image object, you will have to do it manually. That process is, roughly speaking:
- make a data class which represents the internal semantic structure of the file which you want to preserve
- write a data reader that takes the input format (in your case DGN) and extracts the semantic information into an instance of the data class
- write a data writer that takes an instance of your data class and creates a file of the target output format (PIX).

Obviously this requires that the file formats are either publicly documented or easy to reverse engineer, and that both file formats are capable of storing the semantic information you care about. Spatial information is a relatively specialist thing and you should first check that it will be possible to store that in a PIX file.


创建一个Image对象并将其保存为所需格式;请参见此处 [
Create an Image object and save it to the required format; see here[^]


这篇关于如何使用C#将图像文件.DGN转换为.PIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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