ImageSize Property (original) (raw)

Summary

Size of the image in the viewer (single item mode).

Syntax

public virtual LeadSize ImageSize { get; set; } 

Property Value

The size of the image in the viewer in pixels (single item mode). Default value is LeadSize.Empty.

Example

using Leadtools; using Leadtools.Controls; using Leadtools.Codecs; using Leadtools.Drawing; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; using Leadtools.Svg; if (_imageViewer.ActiveItem.HasImage) { LeadSize size = _imageViewer.ActiveItem.ImageSize; // copy the ActiveItem to new Image... RasterImage image2 = _imageViewer.ActiveItem.Image.Clone(); // Resize the image to new size SizeCommand cmd = new SizeCommand(size.Width / 2, size.Height / 2, RasterSizeFlags.None); cmd.Run(image2); // ... // put your code here // ... image2.Dispose(); }