Leadtools TWAIN(Leadtools.Twainアセンブリ)

フレームを表示

ImageEffectsプロパティ(TwainProperties)






現在のデータ送信側のためにimageエフェクトデータプロパティを取得または設定します
構文
public TwainImageEffectsProperties ImageEffects {get; set;}
'Declaration
 
Public Property ImageEffects As TwainImageEffectsProperties
'Usage
 
Dim instance As TwainProperties
Dim value As TwainImageEffectsProperties
 
instance.ImageEffects = value
 
value = instance.ImageEffects

            

            
public:
property TwainImageEffectsProperties ImageEffects {
   TwainImageEffectsProperties get();
   void set (    TwainImageEffectsProperties value);
}

属性値

TwainImageEffects構造体は、imageエフェクトデータクラスを格納します。
解説
このプロパティは、TwainSession.Propertiesプロパティを呼び出した後に呼び出します。この構造体項目を更新した後、TwainSession.Propertiesプロパティを呼び出して設定することでこの値をデータソースに更新できます。
サンプル
Copy Code  
Imports Leadtools
 Imports Leadtools.Twain

#If Not LEADTOOLS_V19_OR_LATER Then
      Public Sub ImageEffectsPropertyExample(ByVal parent As IWin32Window)
#Else
      Public Sub ImageEffectsPropertyExample(ByVal parent As IntPtr)
#End If ' #If LEADTOOLS_V19_OR_LATER Then
         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
using Leadtools;
 using Leadtools.Twain;

#if !LEADTOOLS_V19_OR_LATER
      public void ImageEffectsPropertyExample(IWin32Window parent)
#else
      public void ImageEffectsPropertyExample(IntPtr parent)
#endif // #if !LEADTOOLS_V19_OR_LATER
      {
         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);
         }
      }
必要条件

ターゲットプラットホーム

参照

参照

TwainProperties構造体
TwainPropertiesメンバ