Hello,
I am using aspose.diagram v6.7.0 to generate PNG of page - 'Page-1' of the attached visio file. Incorrect colors come in the PNG output.
I have attached a screenshot comparing the PNG with the Actual Visio Page. Notice the difference in the colors of PNG output and original diagram colors.
The PNG output should look the same as the actual diagrams. The colors should be rendered as they are in actual diagrams.
Following code is used to generate the PNG output:
Diagram diagram = new Diagram("test.vst");
String pageName = "Page-1";
Page srcPage = diagram.getPages().getPage(pageName);
File outputFile = new File("output.png");
int imageFormat = SaveFileFormat.PNG;
int pageIndex = 0;
ImageSaveOptions options = new ImageSaveOptions(imageFormat);
options.setResolution(96);
for (Page page : (Iterable) diagram.getPages()) {
if (page.getID() == srcPage.getID()) {
options.setPageIndex(pageIndex);
options.setPageCount(1);
break;
}
pageIndex++;
}
diagram.save(outputFile.getAbsolutePath(), options);
Can you please analyse this issue.
Thanks,
Neha