HTML JPG CAD XML DGN
  Product Family
GIF

通过 C# 将 DGN 转换为 GIF

无需 AutoCAD® 或任何其他渲染软件即可立即将 DGN 转换为 GIF。

为了将 DGN 转换为 GIF,我们将使用 Aspose.CAD for .NET API,它是一个功能丰富、功能强大且易于使用的用于 C# 平台的文档操作和转换 API。打开 NuGet 包管理器,搜索 Aspose.CAD 并安装。您也可以从包管理器控制台使用以下命令。

包管理器控制台命令


PM> Install-Package Aspose.CAD

通过 C# 将 DGN 转换为 GIF 的步骤

  1. 用Image.Load方法加载DGN文件
  2. 设置页面高度和宽度的CadRasterizationOptions对象
  3. 创建 GifOptions 类的实例并设置其 VectorRasterizationOptions 属性
  4. 在传递 GifOptions 的结果文件路径和对象时调用 Image.Save 方法

转换要求

  • Microsoft Windows 或具有 .NET Framework、.NET Core 和 PHP、VBScript、Delphi、C++(通过 COM 互操作)的兼容操作系统。
  • Microsoft Visual Studio 等开发环境。
  • 项目中引用的 .NET DLL 的 Aspose.CAD。
 

此示例代码显示 DGN 到 GIF C# 的转换

 

将 DGN 转换为 GIF 的免费应用程序

Check our live demos for DGN to GIF conversion with following benefits.

  No need to download or setup anything.
  No need to write any code.
  Just upload your DGN file and hit the "Convert" button.
  You will instantly get the download link for resultant GIF file.