Gets or sets the brightness, highlight and contrast values to use when transferring images from the current TWAIN source.
public Leadtools.Twain.TwainImageEffects ImageEffects {get; set;}
Public Property ImageEffects As Leadtools.Twain.TwainImageEffects
public:
property Leadtools.Twain.TwainImageEffects ImageEffects {
Leadtools.Twain.TwainImageEffects get();
void set ( Leadtools.Twain.TwainImageEffects );
}
Image Effects as brightness, highlight and contrast values to use when transferring images from the current TWAIN source
The ImageEffects property will get and set the brightness, highlight and contrast values for the current TWAIN source.
Imports Leadtools
Imports Leadtools.Twain
Public Sub ImageEffectsPropertyExample(ByVal parent As IntPtr)
Dim session As TwainSession = New TwainSession()
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Dim imgEffects As TwainImageEffects = session.ImageEffects
imgEffects.Flags = TwainImageEffectsFlags.NegotiateBrightness Or TwainImageEffectsFlags.NegotiateContrast Or TwainImageEffectsFlags.NegotiateHighlight
Dim contrast As Single = imgEffects.Contrast
Dim highlight As Single = imgEffects.Highlight
Dim msg As String = String.Format("Image Contrst = {0}" & Constants.vbLf & "Image Highlight = {1}", contrast, highlight)
MessageBox.Show(msg)
imgEffects.Brightness = 100
session.ImageEffects = imgEffects
Dim pageOpts As TwainAcquirePageOptions = session.AcquirePageOptions
pageOpts.PaperSize = TwainPaperSize.A4
pageOpts.PaperOrientation = TwainPaperOrientation.Landscape
session.AcquirePageOptions = pageOpts
session.Shutdown()
End Sub
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();
}
Products |
Support |
Feedback: ImageEffects Property (TwainSession) - 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.