This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, November 2, 2009 2:47:51 AM(UTC)
Groups: Registered
Posts: 3
my code:
public void MyAcquireFast(IWin32Window parent)
{
TwainSession session = new TwainSession();
session.Startup(parent, "", "", "", "", TwainStartupFlags.None);
session.EnableAcquireMultiPageEvent = false;
session.AcquireFast("d:\\test.BMP",
TwainFastUserInterfaceFlags.None,
TwainTransferMode.File,
RasterImageFormat.BMP, 1, true, 0, true);
session.Shutdown();
}
its work.but it output BlackWhite and BMP Format file. I use
session.AcquireFast("d:\\test.jpg",
TwainFastUserInterfaceFlags.None,
TwainTransferMode.File,
RasterImageFormat.jpeg, 1, true, 0, true);
its Exception, i need RGB and JPEG format file. how can i do?
#2
Posted
:
Monday, November 2, 2009 6:00:36 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The TwainSession.AcquireFast method takes a parameter named bitsPerPixel.
You are passing a value of 1 in both cases.
With BMP files, 1 bit means 2 colors only (usually black and white, but could be others).
With JPEG files, 1 bit is NOT a valid value. You should pass 24 bits (color) or if your driver supports it, you could pass 8 for grayscale.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.