Dear Sir,
I’m trying to convert DWG file to TIFF but I can’t change the resolution of the text to get the written words appearing clearly, The written text appears pixeled when zooming the image file (tiff)
this is the image
conic_pyramid_layoutstorasterimage_out.zip (186.8 KB)
This is my code :
string sourceFilePath = @"d:\WS-105.dwg";
LoadOptions _load = new LoadOptions();
_load.SpecifiedEncoding = CodePages.Arabic;
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath, _load))
{
CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
ResolutionSetting oResI = new ResolutionSetting(image.Width * 10, image.Height * 10);
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
rasterizationOptions.PageWidth = image.Width * 10;
rasterizationOptions.PageHeight = image.Height * 10;
rasterizationOptions.GraphicsOptions.SmoothingMode = SmoothingMode.HighQuality;
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.WhiteSmoke;
rasterizationOptions.DrawColor = Aspose.CAD.Color.Black;
rasterizationOptions.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseDrawColor;
rasterizationOptions.UnitType = Aspose.CAD.ImageOptions.UnitType.Centimenter;
rasterizationOptions.Layouts = new string[] { "Layout1" };
TiffOptions tiffOptions = new TiffOptions(TiffExpectedFormat.TiffNoCompressionRgb);
tiffOptions.ResolutionSettings = oResI;
tiffOptions.VectorRasterizationOptions = rasterizationOptions;
ImageOptionsBase options = new TiffOptions(tiffOptions);
image.Save(MyDir + "conic_pyramid_layoutstorasterimage_out.tiff", options);
}