←Select platform

ImageSize Property

Summary

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

Syntax
C#
C++/CLI
public virtual LeadSize ImageSize { get; set; } 
public:  
   virtual property LeadSize^ ImageSize 
   { 
      LeadSize^ get() 
      void set(LeadSize^ value) 
   } 

Property Value

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

Remarks

This is a helper property for applications that use ImageViewer in single item mode. It is a shortcut to ImageSize of ActiveItem. For more information, refer to Image Viewer in Single Item Mode.

Example
C#
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(); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.