Type Default Value Read Only Static Description
Nullable<Size> 0,0 No No The image size limit, after transformation.

This property scales the size of a transformed image to limit its width and height.

ImageGlue finds the bounding rectangle that encloses the transformed image. If the rectangle is bigger than the limiting size it scales the entire image proportionally to shrink it down to the specified size.

This property is ignored for drawing operations that do not involve images.

See Also



Here we make sure the size of the image and of the Canvas is no more than 100x100 pixels.


Canvas canvas = new Canvas();
XImage image = XImage.FromFile(Server.MapPath("rez/boat.gif"));
DrawOptions drawOpts = new DrawOptions();
drawOpts.Limit = new System.Drawing.Size(100, 100);
canvas.DrawImage(image, drawOpts);

[Visual Basic]

Dim canvas As New Canvas()
Dim image As XImage = XImage.FromFile(Server.MapPath("rez/boat.gif"))
Dim drawOpts As New DrawOptions()
drawOpts.Limit = New System.Drawing.Size(100, 100)
canvas.DrawImage(image, drawOpts)