Gets or sets image effects data properties for the current data source
Syntax
Property Value
TwainImageEffects structure contains Image effects data class.
Example
Visual Basic | Copy Code |
---|
Public Sub ImageEffectsPropertyExample(ByVal parent As IWin32Window)
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 |
C# | Copy Code |
---|
public void ImageEffectsPropertyExample(IWin32Window 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);
}
} |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7
See Also