Gets or sets image resolution properties for the current data source.
public Leadtools.Twain.TwainImageResolutionProperties ImageResolution {get; set;}Public Property ImageResolution As Leadtools.Twain.TwainImageResolutionPropertiespublic:property Leadtools.Twain.TwainImageResolutionProperties ImageResolution {Leadtools.Twain.TwainImageResolutionProperties get();void set ( Leadtools.Twain.TwainImageResolutionProperties );}
TwainImageResolutionProperties structure contains Image effects data class.
This property should be called after calling the get Properties property After you update this structure, you can update the TWAIN source by calling the set Properties property.
Imports LeadtoolsImports Leadtools.TwainPublic Sub twainSession_SetProperty(ByVal sender As Object, ByVal e As TwainSetPropertyEventArgs)Dim msg As String = String.Format("Capability %d\nStatus = %d", e.Capability, e.Status)e.Stop = FalseEnd SubPublic Sub ImageResolutionPropertyExample(ByVal parent As IntPtr)TryDim session As TwainSession = New TwainSession()session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)session.EnableSetPropertyEvent = TrueAddHandler session.SetProperty, AddressOf twainSession_SetPropertyDim props As TwainProperties = session.PropertiesDim imageRes As TwainImageResolutionProperties = props.ImageResolutionimageRes.UnitOfResolution = TwainImageUnit.InchesimageRes.BitsPerPixel = 1imageRes.HorizontalResolution = 150imageRes.VerticalResolution = 150imageRes.XScaling = 1imageRes.YScaling = 1imageRes.RotationAngle = 90imageRes.LeftMargin = 0imageRes.RightMargin = 0imageRes.TopMargin = 200imageRes.BottomMargin = 200props.EnableAutoFeed = Trueprops.MaximumNumberOfPages = -1Dim buffer As String = String.Format("Duplex state = {0}", session.DuplexScanningMode.ToString())MessageBox.Show(buffer)props.ImageResolution = imageRessession.Properties = propssession.Shutdown()Catch ex As ExceptionMessageBox.Show(ex.Message)End TryEnd Sub
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);}}
|
Products |
Support |
Feedback: ImageResolution Property - Leadtools.Twain |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.