Hello Syncfusion team,
I noticed that the DiagramComponent::exportImage() and DiagramComponent::exportDiagram() methods alway "stamps" the exported image file with hex signature of PNG (irrespective of the IExportOptions::format flag specified).
If you observe the exported image file in a hex editor, it'll always have the
89 50 4E 47 0D 0A 1A 0A at the beginning of the file. This is the hex signature for PNG files.
Even if you export to a JPEG file (by specifying
IExportOptions::format
= 'JPG'), it'll still have the same PNG's hex signature (and not JPEG's hex signature FF D8 FF).
Can you please take a look?
PS: You can use the Hex editor extension to VSCode to view the file content.
Thanks,
-Mithun