Public API Changes in Aspose.Imaging 2.9.0

Added Methods and Properties

Methods GetDefaultRawData Added

Aspose.Imaging for .NET 2.9.0 has introduced two overload version of Aspose.Imaging.RasterImage.GetDefaultRawData method that could be of help in retrieving empty raw data when image is created from scratch. Below are the signature for both overloads.

  • Aspose.Imaging.RasterImage.GetDefaultRawData(Aspose.Imaging.Rectangle,Aspose.Imaging.IPartialRawDataLoader,Aspose.Imaging.RawDataSettings)
  • Aspose.Imaging.RasterImage.GetDefaultRawData(Aspose.Imaging.Rectangle,Aspose.Imaging.RawDataSettings)

Property AutomaticLayoutsScaling Added

Property Aspose.Imaging.ImageOptions.CadRasterizationOptions.AutomaticLayoutsScaling has been added to perform auto layouts scaling for CAD images. This property could be of help in scenarios where scale for layouts differs from the scale for Model sheet.

Default value is false and layouts are scaled in a same manner as Model sheet.

C#

 using (CadImage cadImage = (CadImage)Image.Load(fileName))

{

    PdfOptions pdfOptions = new PdfOptions();

    pdfOptions.VectorRasterizationOptions = new CadRasterizationOptions();

    CadRasterizationOptions cadRasterizationOptions = (CadRasterizationOptions)pdfOptions.VectorRasterizationOptions;

    cadRasterizationOptions.AutomaticLayoutsScaling = true;

    cadImage.Save(outPath, pdfOptions);

}

VB.NET

 Using cadImage As CadImage = CType(Image.Load(fileName), CadImage)

	Dim pdfOptions As New PdfOptions()

	pdfOptions.VectorRasterizationOptions = New CadRasterizationOptions()

	Dim cadRasterizationOptions As CadRasterizationOptions = CType(pdfOptions.VectorRasterizationOptions, CadRasterizationOptions)

	cadRasterizationOptions.AutomaticLayoutsScaling = True

	cadImage.Save(outPath, pdfOptions)

End Using