ImageSizeWidthPoints Property

Gets the width of the image in points. 1 point is 1/72 inch.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public double WidthPoints { get; }

Property Value

Type: Double
Examples
Shows how to resize an image shape.
DocumentBuilder builder = new DocumentBuilder();

// By default, the image is inserted at 100% scale
Shape shape = builder.InsertImage(ImageDir + "Logo.jpg");

// It is easy to change the shape size. In this case, make it 50% relative to the current shape size
shape.Width = shape.Width * 0.5;
shape.Height = shape.Height * 0.5;

// However, we can also go back to the original image size and scale from there, say 110%
ImageSize imageSize = shape.ImageData.ImageSize;
shape.Width = imageSize.WidthPoints * 1.1;
shape.Height = imageSize.HeightPoints * 1.1;

builder.Document.Save(ArtifactsDir + "Image.ScaleImage.doc");
See Also