Hi,
According to Twain specifications, ICAP_FILTER can be used to dropout certain colors. But VSTwain DeviceCapability doesnt seem to support this particular Capability. Is there any way I can dropout colors(green in my case) using VSTwain? ( we only purchased the VintaSoftTwain.net SDK and not the imaging one).
Thanks,
*
Color Dropout
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Color Dropout
Hello *,
First, you need check that ICAP_FILTER capability is supported by your scanner:
Next, you need get supported values of capability:
Finally, you need set value of capability:
Best regards, Alexander
First, you need check that ICAP_FILTER capability is supported by your scanner:
Code: Select all
DeviceCapability filterCap = device.Capabilities.Find(DeviceCapabilityId.IFilter);
if (filterCap == null)
throw new ApplicationException("ICAP_FILTER capability is not supported by device.");
Code: Select all
DeviceCapabilityValueBase filterCapValue = filterCap.GetValue();
switch (filterCapValue.ContainerType)
{
case DeviceCapabilityContainerType.Array:
ArrayDeviceCapabilityValue filterCapValueAsArray = (ArrayDeviceCapabilityValue)filterCapValue;
// get supported values of capability
...
break;
case DeviceCapabilityContainerType.Enum:
EnumDeviceCapabilityValue filterCapValueAsEnum = (EnumDeviceCapabilityValue)filterCapValue;
// get supported values of capability
...
break;
}
Code: Select all
filterCap.SetValue(X);
-
- Posts: 3
- Joined: Thu May 31, 2012 3:56 pm
Re: Color Dropout
Hi Alex,
Thanks a lot for your reply. Sorry I forgot to mention that we are using Version 6.0.2.1 so I could not check your solution. Can you please give me equivalent code for Version 6?
Regards,
*
Thanks a lot for your reply. Sorry I forgot to mention that we are using Version 6.0.2.1 so I could not check your solution. Can you please give me equivalent code for Version 6?
Regards,
*
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Color Dropout
Hello *,
Here is the code for version 6.0.
First, you need check that ICAP_FILTER capability is supported by your scanner:
Next, you need get supported values of capability:
Finally, you need set value of capability:
Best regards, Alexander
Here is the code for version 6.0.
First, you need check that ICAP_FILTER capability is supported by your scanner:
Code: Select all
VSTwain1.Capability = (int)Vintasoft.Twain.DeviceCapability.IFilter;
if (!VSTwain1.IsCapSupported())
throw new ApplicationException("ICAP_FILTER capability is not supported by device.");
Code: Select all
VSTwain1.GetCap();
switch (VSTwain1.CapType)
{
case CapType.Array:
// get supported values of capability
...
break;
case CapType.Enum:
// get supported values of capability
...
break;
}
Code: Select all
VSTwain1.CapType = CapType.OneValue;
VSTwain1.CapValue = X;
VSTwain1.SetCap();
-
- Posts: 3
- Joined: Thu May 31, 2012 3:56 pm
Re: Color Dropout
Thanks a lot Alex. This worked brilliantly. Although I had to guess the Green value to be '1' as the CapType (0 for red and 2 for blue I think) for this capability is OneValue and I could not get all the valid values.
I had a Fujitsu fi-5530C2 which seems to support this capability and Kodak I1120 scanner which doesnt support it. Is there anyway to get the Capabilities of a particular scanner (before purchasing it) so that we can recommend the client which scanner to purchase incase they need to dropout any particular color?
I had a Fujitsu fi-5530C2 which seems to support this capability and Kodak I1120 scanner which doesnt support it. Is there anyway to get the Capabilities of a particular scanner (before purchasing it) so that we can recommend the client which scanner to purchase incase they need to dropout any particular color?
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Color Dropout
Here is a list of available values for ICAP_FILTER capability:Although I had to guess the Green value to be '1' as the CapType (0 for red and 2 for blue I think) for this capability is OneValue and I could not get all the valid values.
- RED - 0
- GREEN - 1
- BLUE - 2
- NONE - 3
- WHITE - 4
- CYAN - 5
- MAGENTA - 6
- YELLOW - 7
- BLACK - 8
Most of photo scanners can dropout colors.Is there anyway to get the Capabilities of a particular scanner (before purchasing it) so that we can recommend the client which scanner to purchase incase they need to dropout any particular color?
Best regards, Alexander