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

フレームを表示

ImageEffectsプロパティ(TwainSession)






現在のTWAINソースからイメージを転送するとき、使う明度、ハイライトとコントラスト値を取得または設定します。
構文
public TwainImageEffects ImageEffects {get; set;}
'Declaration
 
Public Property ImageEffects As TwainImageEffects
'Usage
 
Dim instance As TwainSession
Dim value As TwainImageEffects
 
instance.ImageEffects = value
 
value = instance.ImageEffects

            

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

属性値

現在のTWAINソースからイメージを転送するとき、使う明度、ハイライトとコントラスト値としてのimageエフェクト
解説
ImageEffectsプロパティは、現在のTWAINソースのために明度、ハイライトとコントラスト値を取得して設定します。
サンプル
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
         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;

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

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

参照

参照

TwainSessionクラス
TwainSessionメンバ
Startupメソッド
Shutdownメソッド
Acquireメソッド
MaximumTransferCountプロパティ
DuplexScanningModeプロパティ
EnableDuplexScanningプロパティ
AcquirePageOptionsプロパティ
ImageBitsPerPixelプロパティ
ImageUnitプロパティ
ImageFrameプロパティ
IsTransferModeAvailableなメソッド
TransferOptionsプロパティ
ShowProgressIndicatorメソッド