Loading...

Can't seem to set the brightness with GdTWAIN

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

Can't seem to set the brightness with GdTWAIN

Postby procreator » Tue Sep 30, 2008 10:34 pm

I can't seem to adjust brightness or contrast using GdTWAIN (GdPicture Pro package). I am trying to interface with a HP Scanjet G3010.

These are the lines of code take from the demo code, with the exception that I replaced the scroll bar value with a constant.

Code: Select all
Imaging1.TwainSetAutoBrightness (False)
Imaging1.TwainSetCurrentBrightness (-100)


If I return the available brightness values, I get an array ranging in values from -1000 to 1000.

Any ideas?

Thanks!
procreator
 
Posts: 21
Joined: Tue Nov 20, 2007 12:53 am

Re: Can't seem to set the brightness with GdTWAIN

Postby MIKES » Tue Sep 30, 2008 11:00 pm

Are you scanning in Black/White or Grayscale.
Just tested mine and Brightness has no effect when scanning Black/White.

Are you checking for an Error? Though I have not seen setting brightness fail.

Code: Select all
If Not Imaging1.TwainSetCurrentBrightness(Bright_Value) Then
      Result = CheckForLastError("Failure Setting Brightness: " & Bright_Value)
End If


Is (-100) enough to notice? Try the extremes 1000 and -1000
MIKES
 
Posts: 49
Joined: Thu Jul 31, 2008 8:03 pm
Location: Michigan

Re: Can't seem to set the brightness with GdTWAIN

Postby procreator » Tue Sep 30, 2008 11:45 pm

I installed the full driver package that came with thte scanner, and I no longer get an error code when I try to change the brightness. However, the image itself doesn't seem to be affected when I change.

Any ideas? If this functionality doesn't work on this model of scanner, is there another with which it will work?

Thanks!
procreator
 
Posts: 21
Joined: Tue Nov 20, 2007 12:53 am

Re: Can't seem to set the brightness with GdTWAIN

Postby procreator » Wed Oct 01, 2008 3:22 pm

BTW - I am scanning in grayscale, and have tried brightness settings ranging from -1000 to 1000.
procreator
 
Posts: 21
Joined: Tue Nov 20, 2007 12:53 am

Re: Can't seem to set the brightness with GdTWAIN

Postby MIKES » Thu Oct 02, 2008 3:29 pm

I do not have any more ideas, perhaps Loic does.

Are you familiar with the twack_32 application in the Twain Developers TookKit on www.twain.org ?

I have found it useful to check getting/setting a scanners capabilities without having to program for it.
Mike S.
GdPicturePro.Net v6.2.14
GdPicturePro5 v5.8.0
Vb.Net /Visual Studio 2005
MIKES
 
Posts: 49
Joined: Thu Jul 31, 2008 8:03 pm
Location: Michigan

Re: Can't seem to set the brightness with GdTWAIN

Postby procreator » Thu Oct 02, 2008 3:38 pm

I got the problem fixed. Apparently the scanner driver didn't install correctly the first time. Unplugging the scanner, then plugging it in resolved the problem.

Thanks for all your help!
procreator
 
Posts: 21
Joined: Tue Nov 20, 2007 12:53 am


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest