LEADTOOLS Image File Support (Leadtools.Codecs assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
MaintainAspectRatio Property
See Also 
Leadtools.Codecs Namespace > CodecsThumbnailOptions Structure : MaintainAspectRatio Property



Gets or sets a value which indicates whether the aspect ratio of the image should be maintained when creating the thumbnail.

Syntax

Visual Basic (Declaration) 
Public Property MaintainAspectRatio As Boolean
Visual Basic (Usage)Copy Code
Dim instance As CodecsThumbnailOptions
Dim value As Boolean
 
instance.MaintainAspectRatio = value
 
value = instance.MaintainAspectRatio
C# 
public bool MaintainAspectRatio {get; set;}
C++/CLI 
public:
property bool MaintainAspectRatio {
   bool get();
   void set (    bool value);
}

Property Value

true to indicates that the aspect ratio of the image should be maintained when creating the thumbnail, otherwise; false.

Example

For an example, refer to RasterCodecs.ReadThumbnail.

Remarks

When set to true, the generated thumbnail's width and height will not match both Width and Height if the original aspect ratio was not 1:1.

If you desire the thumbnail be generated with exactly the requested width and height while still maintaining the aspect ratio of the actual image, set both MaintainAspectRatio and ForceSize to true.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also