Hi there,
We have observed an issue with converted SVG image (from EMF).
We could see that few of the SVG images contents are actually base64 encoded PNG content and not acutal SVG image contents.
Is it possible to return a flag for these kinds of cases so that we could actually extract a PNG instead of loading the SVG ?
I have attached below two images for your reference.
image6.emf is converted to SVG but the actual contents of the SVG are base64 PNG.
image22.wmf is converted to SVG.
Code Snippet :
String fileName = “image34.emf”;
String baseFolder = “C:\Users\gm69267\Desktop\EMF - issues\”;
String inputFileName = baseFolder + fileName;
String outputFileName = baseFolder + fileName + “.svg”;
Image image = Image.load(inputFileName);
try {
// Create an instance of EmfRasterizationOptions class and set
// different options
final EmfRasterizationOptions emfRasterizationOptions = new EmfRasterizationOptions();
emfRasterizationOptions.setPageWidth(image.getWidth());
emfRasterizationOptions.setPageHeight(image.getHeight());
// call the save method and pass instance of SvgOptions class to
// convert it to SVG format.
image.save(baseFolder + "image35.svg", new SvgOptions() {
{
setVectorRasterizationOptions(emfRasterizationOptions);
}
});
}
finally
{
image.close();
}
EMF - issues.zip (697.9 KB)