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)
I have opened a ticket with ID CADNET-1221 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
The issue has been marked for review in upcoming Aspose.CAD for .NE 20.12. We request for your patience and will share the good news with you as soon as the issue will be addressed.
I am using AsposeCad v22.11.00 and got the same error while loading a DXF file.
The code of the stack was the following:
Aspose.CAD.CadExceptions.ImageFormats.CadException: Invalid group code
en #=zxpCO8Oyz_rfF_xjFuGmlyZD3Wo8bqTv3f32TSDo=.#=z4hxgD30=()
en #=zxpCO8Oyz_rfF_xjFuGmlyZD3Wo8bqTv3f32TSDo=.#=zICr2oNQ=()
en Aspose.CAD.FileFormats.Cad.CadObjects.AcadTable.CadTableCell.#=znsuYtJw=(CadCodeValue #=zt0ITq3RY_tpc, #=znQ8j_iYA5UeKhExBDdgIJnxC59blUNWCmpA4Acs= #=zZPFMhR8=)
en #=z2ak$DSQRDJfAQKpXECLbrk0YXNS$Ajb7Txg0Gb5Agi9nSlUNquUWFZc=.#=zLAdh3cWZJG_5(CadTableEntity #=znFVJYZk=)
en #=z3$TZDMLMZw_i_9gDrvUuji5D9jSMjtAxqUAhLu8Nh6tsdXhkPQ==.#=zlzOjE8uLTYqJ(CadBase #=znFVJYZk=)
en #=zkgGg7WN9Yg_j5oI6Y5ThggCbX33V4pKY1gS6iJC_vWgIvVz1Jg==.#=znsuYtJw=(CadBase #=znFVJYZk=, #=znQ8j_iYA5UeKhExBDdgIJnxC59blUNWCmpA4Acs= #=zZPFMhR8=, String #=zQz7gPen11XJP, CadEntityAttribute #=zAOKdvx0Z9poR, Boolean #=z6BXPrPRWO53NrH7GUQ==)
Exception thrown: ‘Aspose.CAD.CadExceptions.ImageLoadException’ in Aspose.CAD.dll