We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get initial size picture

Hi !
I want to get width and height of a picture on my word document.
My picture is into a Shape or InlineShape object :

shapes = doc.GetChildNodes(NodeType.Shape, true);
foreach (Shape shape in shapes)
// Si c’est une image dans le corps du document
if (shape.ImageFormat != null && shape.GetAncestor(typeof(Body)) != null)

shape.ImageFormat.InitialHeight ???

Can I’ve got width and height of my picture ? And specially the initial size.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I think you can use ImageData.ImageSize. Please see the following link for more information.


I hope this helps.

Best regards.

And if ImageData doesn’t exists ?

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. You can use Shape.Width and Shape.Height.


Best regards.