Manipulating Dxf images
Contents
[
Hide
]
Aspose.Imaging for .NET supports export to Dxf format from vectorized formats(ie. SVG, EPS, etc). Raster images Dxf does not support.
Export eps to dxf image
Saving of eps image to dxf provided:
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
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Bmp; | |
using Aspose.Imaging.FileFormats.Eps; | |
using Aspose.Imaging.FileFormats.Eps.Consts; | |
using Aspose.Imaging.FileFormats.Png; | |
using Aspose.Imaging.FileFormats.Psd; | |
using Aspose.Imaging.FileFormats.Svg; | |
using Aspose.Imaging.ImageOptions; | |
using Aspose.Imaging.Sources; | |
using System; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads\templates\"; | |
string dataDir = templatesFolder; | |
string outputFilePath = dataDir + "result.dxf"; | |
using (Image image = Image.Load(dataDir+"template.eps")) | |
{ | |
DxfOptions options = new DxfOptions(); | |
options.TextAsLines = true; | |
options.ConvertTextBeziers = true; | |
options.BezierPointCount = 20; | |
image.Save(outputFilePath, options); | |
} | |
File.Delete(dataDir + "result.dxf"); |