My Fujitsu fi-4120C can support, according to its UI, B&W, Grayscale, Color as 8 colors, 256 colors, or 24 bit color. When I try and use 24 in the TwainSetBitDepth function it fails but will not fail if I use 8 as the bit depth. In looking at the GDPicture Twain sample there is this line:
oGdPictureImaging.TwainSetBitDepth(8); // 24 bpp
My question is how does the 8 represent 24 bit? This leads me to believe that the number you specify in TwainSetBitDepth function does not really represent the actual bit depth even though the parameter description says BitDepth. I am just looking for some clarification on this topic because I need to know if the users are actually scanning in color at 8 bits or 24 bits if I use the 8 as it is used in the GDPicture Twain Sample.
Thanks for your help in advance.
Using 8 bit for 24bit in function TwainSetBitDepth
Re: Using 8 bit for 24bit in function TwainSetBitDepth
Hello Brian,
This is probably an error in the sample. If you want to acquire in color you have first to specify the pixel type and then apply to correct bit depth.
For your need it should be:
Let me know if you need further info.
With best regards,
Loïc
This is probably an error in the sample. If you want to acquire in color you have first to specify the pixel type and then apply to correct bit depth.
For your need it should be:
Code: Select all
oGdPictureImaging.TwainSetPixelType(TwainPixelType.TWPT_RGB);
oGdPictureImaging.TwainSetBitDepth(24);
With best regards,
Loïc
Re: Using 8 bit for 24bit in function TwainSetBitDepth
Thanks but it still will not accept the 24. For the TwainSetPixelType I can use TWPT_RGB, TWPT_PALETTE, TWPT_GRAY, and TWPT_BW. When I use RGB or PALETTE the highest value I can enter for the TwainSetBitDepth is 8 all other values return false when I call the method. In looking at the TwainGetLastResultCode() it returns TWRC_FAILURE and the TwainGetLastConditionCode returns TWCC_CAPSEQERROR. So it looks like the scanner cannot support 24 bit but I don't understand why the scanner UI displays 24bit.
Who is online
Users browsing this forum: No registered users and 1 guest