HTML JPG CAD XML DWT
  Product Family
BMP

تحويل DWT إلى BMP عبر C #

قم بتحويل DWT إلى BMP على الفور دون الحاجة إلى AutoCAD® أو أي برنامج عرض آخر.

لتحويل DWT إلى BMP ، سنستخدم Aspose.CAD for .NET API وهو غني بالميزات وقوي و سهل الاستخدام للتعامل مع المستندات وتحويلها API لمنصة C #. افتح مدير الحزم NuGet ، وابحث عن Aspose.CAD وقم بتثبيته. يمكنك أيضًا استخدام الأمر التالي من Package Manager Console.

أمر وحدة تحكم مدير الحزم


PM> Install-Package Aspose.CAD

خطوات تحويل DWT إلى BMP عبر C #

  1. قم بتحميل ملف DWT باستخدام طريقة Image.Load
  2. تعيين كائن CadRasterizationOptions مع ارتفاع الصفحة وعرضها
  3. قم بإنشاء مثيل لفئة BmpOptions وقم بتعيين خاصية VectorRasterizationOptions الخاصة بها
  4. استدعاء طريقة Image.Save أثناء تمرير مسار الملف الناتج وكائن BmpOptions

متطلبات التحويل

  • Microsoft Windows أو نظام تشغيل متوافق مع .NET Framework و .NET Core و PHP و VBScript و Delphi و C ++ عبر COM Interop.
  • بيئة التطوير مثل Microsoft Visual Studio.
  • Aspose.CAD لـ .NET DLL المشار إليها في مشروعك.
 

يوضح نموذج الشفرة هذا تحويل DWT إلى BMP C #

// load DWT in an instance of Image via its Load method
using (var image = Image.Load("template.dwt"))
{
// 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 DWT to BMP
image.Save("output.bmp", options);
}
 

تطبيق مجاني لتحويل DWT إلى BMP

Check our live demos for DWT to BMP conversion with following benefits.

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