ImageSize Property

Summary

Gets the size of the current image in the viewer.

Syntax

C#
C++/CLI
C++
public virtual SizeF ImageSize { get; } 
[BrowsableAttribute(false)] 
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] 
public: 
virtual property SizeF ImageSize { 
   SizeF get(); 
} 
public:  
   virtual property SizeF^ ImageSize 
   { 
      SizeF^ get() 
   } 

Property Value

The size of the current image in the viewer.

Example

C#
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Drawing; 
 
private void viewer_BorderPadding(object sender, EventArgs e) 
{ 
   RasterImageViewer viewer = sender as RasterImageViewer; 
   MessageBox.Show(viewer.SizeMode.ToString()); 
} 
 
public void RasterImageViewer_BorderPadding(RasterImageViewer viewer) 
{ 
   ViewerBorderPadding b = viewer.BorderPadding; 
   string s = string.Format("Border Padding: All {0}  Left {1}  Top {2}  Right {3}  Bottom {4}", b.All, b.Left, b.Top, b.Right, b.Bottom); 
   Console.WriteLine(s); 
   Console.WriteLine("Image Dpi: (" + viewer.ImageDpiX + ", " + viewer.ImageDpiY + ")"); 
   Console.WriteLine("Image Size: " + viewer.ImageSize.Width + ", " + viewer.ImageSize.Height); 
 
   s = string.Format("LogicalViewRectangle {0}", viewer.LogicalViewRectangle); 
   Console.WriteLine(s); 
   s = string.Format("PhysicalViewRectangle {0}", viewer.PhysicalViewRectangle); 
   Console.WriteLine(s); 
 
} 

Requirements

Target Platforms

See Also

Reference

RasterImageViewer Class

RasterImageViewer Members

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

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