←Select platform

YScaling Property

Summary
Gets or sets the acquired image Y-direction scaling value before transferring.

Syntax
C#
C++/CLI
Python
public float YScaling { get; set; } 
public: 
property float YScaling { 
   float get(); 
   void set (    float ); 
} 
YScaling # get and set (TwainImageResolutionProperties) 

Property Value

The acquired image Y-direction scaling value before transferring.

Example
C#
using Leadtools; 
using Leadtools.Twain; 
 
 
void session_SetProperty(object sender, TwainSetPropertyEventArgs e) 
{ 
   string msg = string.Format("Capability %d\nStatus = %d", e.Capability, e.Status); 
   e.Stop = false; 
} 
 
public void ImageResolutionPropertyExample(IntPtr parent) 
{ 
   try 
   { 
      TwainSession session = new TwainSession(); 
      session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); 
 
      session.EnableSetPropertyEvent = true; 
      session.SetProperty += new EventHandler<TwainSetPropertyEventArgs>(session_SetProperty); 
      TwainProperties props = session.Properties; 
      TwainImageResolutionProperties imageRes = props.ImageResolution; 
 
      imageRes.UnitOfResolution = TwainImageUnit.Inches; 
      imageRes.BitsPerPixel = 1; 
      imageRes.HorizontalResolution = 150; 
      imageRes.VerticalResolution = 150; 
      imageRes.XScaling = 1; 
      imageRes.YScaling = 1; 
      imageRes.RotationAngle = 90; 
 
      imageRes.LeftMargin = 0; 
      imageRes.RightMargin = 0; 
      imageRes.TopMargin = 200; 
      imageRes.BottomMargin = 200; 
 
      props.EnableAutoFeed = true; 
      props.MaximumNumberOfPages = -1; 
 
      string buffer = string.Format("Duplex state = {0}", session.DuplexScanningMode.ToString()); 
      MessageBox.Show(buffer); 
 
      props.ImageResolution = imageRes; 
      session.Properties = props; 
      session.Shutdown(); 
   } 
   catch (Exception ex) 
   { 
      MessageBox.Show(ex.Message); 
   } 
} 
Requirements

Target Platforms

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

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