TwainSetPixelType - What is the value for "Automatic"?
-
- Posts: 7
- Joined: Tue Nov 05, 2013 4:38 pm
TwainSetPixelType - What is the value for "Automatic"?
We recently bought a license for GdPicture.NET 10.
I am working together with another developer to implement GdPicture to replace an old scan component.
Could you tell me what the value should be to set the PixelType to automatic? I don't see this in the documentation:
https://www.gdpicture.com/guides/gdpicture/fra ... lType.html
Please check the attachment, in which you will see the "Auto Detect Color" option: I can access all the other options through one of the PixelType values but the automatic one won't work.
I have tried:
null
-1
99 (wanted to test outside the range of the given constants)
I am working together with another developer to implement GdPicture to replace an old scan component.
Could you tell me what the value should be to set the PixelType to automatic? I don't see this in the documentation:
https://www.gdpicture.com/guides/gdpicture/fra ... lType.html
Please check the attachment, in which you will see the "Auto Detect Color" option: I can access all the other options through one of the PixelType values but the automatic one won't work.
I have tried:
null
-1
99 (wanted to test outside the range of the given constants)
Re: TwainSetPixelType - What is the value for "Automatic"?
Since GdPicture.NET accesses to the TWAIN Data Source Manager only, it cannot have any control over the drivers generated settings window so there is absolutely no relation between what you set in your code and what you see and set in the drivers settings window.
Anyway "Auto Detect Color" isn't a PixelType in the first place, it is obviously one of the other choices and it is automatically identified by the scanner own software.
So either you hide the driver UI and set the values in your code or you show the driver UI and let the user set the values in it but you definitely cannot do both.
If you want to do the exact same thing in your source code only, you should consider our Color Detection plugin (here: https://www.gdpicture.com/products/plugi ... ection.php ).
Anyway "Auto Detect Color" isn't a PixelType in the first place, it is obviously one of the other choices and it is automatically identified by the scanner own software.
So either you hide the driver UI and set the values in your code or you show the driver UI and let the user set the values in it but you definitely cannot do both.
If you want to do the exact same thing in your source code only, you should consider our Color Detection plugin (here: https://www.gdpicture.com/products/plugi ... ection.php ).
Re: TwainSetPixelType - What is the value for "Automatic"?
Hello,
Some additional information:
If your TWAIN device supports automatic color detection capability you should be able to enable it by setting the ICAP_AUTOMATICCOLORENABLED cap to 1.
Here a vb example:
Hope this helps!
With best regards,
Loïc
Some additional information:
If your TWAIN device supports automatic color detection capability you should be able to enable it by setting the ICAP_AUTOMATICCOLORENABLED cap to 1.
Here a vb example:
Code: Select all
Imaging1.TwainSetCapCurrentNumeric(TwainCapabilities.ICAP_AUTOMATICCOLORENABLED, Imaging1.TwainGetCapItemType(TwainCapabilities.ICAP_AUTOMATICCOLORENABLED), 1)
With best regards,
Loïc
-
- Posts: 7
- Joined: Tue Nov 05, 2013 4:38 pm
Re: TwainSetPixelType - What is the value for "Automatic"?
Thank you both for the feedback. I will continue with your suggestions.
-
- Posts: 7
- Joined: Tue Nov 05, 2013 4:38 pm
Re: TwainSetPixelType - What is the value for "Automatic"?
Thanks a lot Loïc! Your suggestion worked without any problem.
If the scanner doesn't support automatic color detection I guess it will default to it's own default value.
If the scanner doesn't support automatic color detection I guess it will default to it's own default value.
Who is online
Users browsing this forum: No registered users and 1 guest