Contains information about image size and resolution.
For a list of all members of this type, see ImageSize Members.
System.Object
Aspose.Words.Drawing.ImageSize
[Visual Basic]
Public Class ImageSize
[C#]public class ImageSize
Remarks
Example
Shows how to resize an image shape.
[C#]
DocumentBuilder builder = new DocumentBuilder();
// By default, the image is inserted at 100% scale.
Shape shape = builder.InsertImage(MyDir + "Aspose.Words.gif");
// 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(MyDir + "Image.ScaleImage Out.doc");
[Visual Basic]
Dim builder As DocumentBuilder = New DocumentBuilder()
' By default, the image is inserted at 100% scale.
Dim shape As Shape = builder.InsertImage(MyDir & "Aspose.Words.gif")
' 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%.
Dim imageSize As ImageSize = shape.ImageData.ImageSize
shape.Width = imageSize.WidthPoints * 1.1
shape.Height = imageSize.HeightPoints * 1.1
builder.Document.Save(MyDir & "Image.ScaleImage Out.doc")
Requirements
Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll)
See Also
ImageSize Members | Aspose.Words.Drawing Namespace | ImageSize