I am using the below code to find and replace an image in an existing DOCX file using Aspose words. The original image in the DOCX file has a different width/height ratio; and the new one I am trying to use instead has different ratio. The new image is shown in the final DOCX, but the aspect ratio still belongs to the old image. Below is the code I use to replace the image:
Dim drawings As Aspose.Words.NodeCollection = gWordDocument.GetChildNodes(Aspose.Words.NodeType.DrawingML, True)
For Each drawing As Aspose.Words.Drawing.DrawingML In drawings
If drawing.HasImage Then
drawing.ImageData.ImageBytes = pLogoImageBytes
Please advise on how to update/reset the image object width/height and/or scale etc. so that the final DOCX file shows the replaced image in correct aspect ratio.