KB: How to set the brightness and contrast at scanning?

Questions, comments and suggestions concerning VintaSoft Twain ActiveX.

Moderator: Alex

Post Reply
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

KB: How to set the brightness and contrast at scanning?

Post by Alex »

Brightness and contrast of color, gray and palette images may be set with the Brightness capability:

Code: Select all

  VSTwain1.StartDevice()
  VSTwain1.OpenDataSource()
  VSTwain1.Brightness = VSTwain1.BrightnessMaxValue
  VSTwain1.Contrast = VSTwain1.ContrastMaxValue
  VSTwain1.Acquire()
Brightness and contrast of black-white images may be set with the IThreshold capability:

Code: Select all

  VSTwain1.StartDevice()
  VSTwain1.OpenDataSource()
  VSTwain1.Capability = 4387     ' 0x1123
  VSTwain1.CapType = 0           ' One value
  VSTwain1.capValue = 150        ' can be changed from 0 to 255
  VSTwain1.SetCap()
  VSTwain1.Acquire()
Post Reply