public TwainImageEffectsProperties ImageEffects { get; set; }
Public Property ImageEffects As TwainImageEffectsProperties
public:
property TwainImageEffectsProperties ImageEffects {
TwainImageEffectsProperties get();
void set ( TwainImageEffectsProperties );
}
TwainImageEffects structure contains Image effects data class.
This property should be called after calling get Properties property After you update this structure items, you can update the values to data source by calling set Properties property.
using Leadtools;
using Leadtools.Twain;
public void ImageEffectsPropertyExample(IntPtr parent)
{
try
{
TwainSession session = new TwainSession();
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);
TwainProperties props = session.Properties;
TwainImageEffectsProperties imageEfx = props.ImageEffects;
imageEfx.PixelFlavor = TwainImagePixelFlavor.Vanilla;
imageEfx.ColorScheme = TwainColorScheme.BlackWhite;
imageEfx.Highlight = 50;
imageEfx.Shadow = 50;
imageEfx.Brightness = 500;
imageEfx.Contrast = 100;
string buffer = string.Format("Current used Halftone = {0}", imageEfx.Halftone);
MessageBox.Show(buffer);
props.ImageEffects = imageEfx;
session.Properties = props;
session.Shutdown();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Imports Leadtools
Imports Leadtools.Twain
Public Sub ImageEffectsPropertyExample(ByVal parent As IntPtr)
Try
Dim session As TwainSession = New TwainSession()
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Dim props As TwainProperties = session.Properties
Dim imageEfx As TwainImageEffectsProperties = props.ImageEffects
imageEfx.PixelFlavor = TwainImagePixelFlavor.Vanilla
imageEfx.ColorScheme = TwainColorScheme.BlackWhite
imageEfx.Highlight = 50
imageEfx.Shadow = 50
imageEfx.Brightness = 500
imageEfx.Contrast = 100
Dim buffer As String = String.Format("Current used Halftone = {0}", imageEfx.Halftone)
MessageBox.Show(buffer)
props.ImageEffects = imageEfx
session.Properties = props
session.Shutdown()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document