Low image quality when converting Word to Markdown

When i converting a Word document to markdown, the exported files are with a very low quality (small size).
I want to keep the original size, same as saving the images manually directly from word.

Any idea?

Images-Issue.docx (893.7 KB)
Converted-1.png (15.2 KB)
Converted-2.png (13.3 KB)
Converted-3.jpg (38.1 KB)
Converted-4.png (5.2 KB)
Saved-From-Word-1.png (71.2 KB)
Saved-From-Word-2.png (49.4 KB)
Saved-From-Word-3.jpg (74.5 KB)
Saved-From-Word-4.png (18.8 KB)

@diemos, could you please attach a sample document with image files for analysis?

I uploaded one document sample.
I also uploaded the converted files, and the same files saved directly from the word document. You can see the images size differences.

@diemos, I can confirm that Aspose.Words downscales the images, and currently there is no way to prevent this through the public API.

However, it is possible to access the original image data via ImageSavingArgs.CurrentShape property. In the example below, the original images are saved together with downscaled images, and after the conversion to Markdown is finished, the downscaled images are replaced with the original images.

OriginalImageSaving imageSavingCallback = new OriginalImageSaving();

Document doc = new Document("Images-Issue.docx");

MarkdownSaveOptions so = new MarkdownSaveOptions()
{
    ImageSavingCallback = imageSavingCallback
};

doc.Save("out.md", so);

foreach (var item in imageSavingCallback.ImageFiles)
{
    File.Delete(item.Item1);
    File.Move(item.Item2, item.Item1);
}


class OriginalImageSaving : IImageSavingCallback
{
    public List<Tuple<string, string>> ImageFiles = new List<Tuple<string, string>>();

    void IImageSavingCallback.ImageSaving(ImageSavingArgs args)
    {
        if (args.CurrentShape.IsImage)
        {
            string originalImageFile = $"{args.ImageFileName}.original";

            Shape shape = (Shape)args.CurrentShape;
            shape.ImageData.Save(originalImageFile);

            ImageFiles.Add(new Tuple<string, string>(args.ImageFileName,originalImageFile));
        }
    }
 }

Please refer to our documentation for more details:

Working!
Thank you very much!!