←Select platform

ColorScheme Property

Summary
Gets or sets color scheme to use when scanning is to be done.

Syntax
C#
C++/CLI
Python
public TwainColorScheme ColorScheme { get; set; } 
public: 
property TwainColorScheme ColorScheme { 
   TwainColorScheme get(); 
   void set (    TwainColorScheme ); 
} 
ColorScheme # get and set (TwainImageEffectsProperties) 

Property Value

Color scheme to use when scanning is to be done. Possible values are (according to the TWAIN specification): TwainCapabilityValue.PixelTypeBW Black and White (1 bit). TwainCapabilityValue.PixelTypeGray 8-bit Gray Scale TwainCapabilityValue.PixelTypeRgb 24-bit RGB Color. TwainCapabilityValue.PixelTypePalette 8-bit Color. TwainCapabilityValue.PixelTypeCmy CYAN, magenta, yellow color space. TwainCapabilityValue.PixelTypeCmyk CYAN, magenta, yellow, black color space. TwainCapabilityValue.PixelTypeYuv Color space type that is true color encoding. It uses one luminance value (Y) and two chroma values (UV). TwainCapabilityValue.PixelTypeYuvk The same as YUV with an additional black variable. TwainCapabilityValue.PixelTypeCieXyz Chromaticity diagram.

Example
C#
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); 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Twain Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.