HTML
JPG
CAD
XML
DGN
BMP
C#を介してDGNをBMPに変換します
AutoCAD®やその他のレンダリングソフトウェアを必要とせずに、DGNをBMPに即座に変換します。
DGNをBMPに変換するために、機能が豊富で強力な Aspose.CAD for .NETAPIを使用します。 C#プラットフォーム用の使いやすいドキュメント操作および変換API。 NuGet パッケージマネージャーを開き、Aspose.CADを検索してインストールします。パッケージマネージャーコンソールから次のコマンドを使用することもできます。
パッケージマネージャーコンソールコマンド
PM> Install-Package Aspose.CAD
C#を介してDGNをBMPに変換する手順
- Image.Loadメソッドを使用してDGNファイルをロードします
- ページの高さと幅でCadRasterizationOptionsのオブジェクトを設定します
- BmpOptionsクラスのインスタンスを作成し、そのVectorRasterizationOptionsプロパティを設定します
- BmpOptionsの結果のファイルパスとオブジェクトを渡しながら、Image.Saveメソッドを呼び出します
変換要件
-Microsoft Windows、または.NET Framework、.NET Core、およびCOM相互運用機能を介したPHP、VBScript、Delphi、C++との互換性のあるOS。 -MicrosoftVisualStudioのような開発環境。 -プロジェクトで参照されているAspose.CADfor.NETDLL。
このサンプルコードは、DGNからBMPへのC#変換を示しています
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// load DGN in an instance of Image via its Load method | |
using (var image = Image.Load("template.dgn")) | |
{ | |
// create an instance of CadRasterizationOptions and set page height & width | |
var rasterizationOptions = new ImageOptions.CadRasterizationOptions() | |
{ | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// create an instance of BmpOptions | |
var options = new ImageOptions.BmpOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// export DGN to BMP | |
image.Save("output.bmp", options); | |
} |
DGNをBMPに変換する無料アプリ
Check our live demos for DGN to BMP 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 BMP file.