Issue description:
For some DXF files the library .NET ASPOSE.CAD (version 20.6.0-20.9.1) throws the following exception:
Image loading failed: Invalid group code
Versions which present this issue:
.NET ASPOSE.CAD 20.6.0 - 20.9.1
Code snippet for testing:
using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(filename))
{
Aspose.CAD.Rectangle rect = cadImage.Bounds;
var options = new Aspose.CAD.ImageOptions.JpegOptions();
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions()
{
BackgroundColor = Aspose.CAD.Color.White,
PageHeight = 1000,
PageWidth = 1000,
DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor
};
options.VectorRasterizationOptions = rasterizationOptions;
// save DXF as a JPEG
cadImage.Save(Path.GetDirectoryName(filename) + "\\" + Path.GetFileNameWithoutExtension(filename) + ".jpg", options);
}
File DXF for testing: see attachment
TCAA0012600.zip (59.1 KB)