I have a .vsd file that prior to Aspose.Diagram 18.8 would encounter the DIAGRAMNET-51499 issue.This file processes with no issue in 18.10. However, saving that same file as .vsdx now encounters an Overflow error at the same location.
So:
.vsd file works fine where it did not prior to 18.8 (DIAGRAMNET-51499).
That same file saved as .vsdx now fails with a new error “Overflow error”
This is with the latest 18.10 release.
Code:
Diagram diagram = new Diagram(visioFile);
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFileFormat.TIFF)
{
PixelOffsetMode = PixelOffsetMode.HighQuality,
SmoothingMode = SmoothingMode.HighQuality,
CompositingQuality = CompositingQuality.HighQuality,
};
for (int p = 0; p < diagram.Pages.Count; p++)
{
if (diagram.Pages[p].Background == BOOL.True)
{
continue;
}
imageSaveOptions.PageIndex = p;
byte[] imageContent;
using (MemoryStream imageStream = new MemoryStream())
{
diagram.Save(imageStream, imageSaveOptions); // <-- fails here with Overflow Error
imageContent = imageStream.GetBuffer();
}
// code copying image to Word document
}
Possibly a regression of: Exception at Diagram.save when converting to image (DIAGRAMNET-51368) ?