←Select platform

Flags Property

Summary
Gets or sets flags that indicate the method behavior

Syntax
C#
C++/CLI
Python
public TwainImageEffectsFlags Flags { get; set; } 
public: 
property TwainImageEffectsFlags Flags { 
   TwainImageEffectsFlags get(); 
   void set (    TwainImageEffectsFlags ); 
} 
Flags # get and set (TwainImageEffects) 

Property Value

Flags that indicate the method behavior

Remarks

If the NegotiateHighlight is set, then the ImageEffects property will get/set Highlight property

If the NegotiateContrast is set, then the ImageEffects property will get/set Contrast property

If the NegotiateBrightness is set, then the ImageEffects property will get/set Brightness property

Example
C#
using Leadtools; 
using Leadtools.Twain; 
 
 
public void ImageEffectsPropertyExample(IntPtr parent) 
{ 
   TwainSession session = new TwainSession(); 
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); 
 
   TwainImageEffects imgEffects = session.ImageEffects; 
   imgEffects.Flags = TwainImageEffectsFlags.NegotiateBrightness | TwainImageEffectsFlags.NegotiateContrast | TwainImageEffectsFlags.NegotiateHighlight; 
   float contrast = imgEffects.Contrast; 
   float highlight = imgEffects.Highlight; 
   string msg = String.Format("Image Contrst = {0}\nImage Highlight = {1}", contrast, highlight); 
   MessageBox.Show(msg); 
 
   imgEffects.Brightness = 100; 
   session.ImageEffects = imgEffects; 
 
   TwainAcquirePageOptions pageOpts = session.AcquirePageOptions; 
   pageOpts.PaperSize = TwainPaperSize.A4; 
   pageOpts.PaperOrientation = TwainPaperOrientation.Landscape; 
   session.AcquirePageOptions = pageOpts; 
 
   session.Shutdown(); 
} 
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.