Save two images with one scan
Save two images with one scan
is it possible to create two images - one color and one black and white - for OCR and archiving with a single pass?
-
- Posts: 24
- Joined: Tue Nov 27, 2007 2:50 am
Good question. I could see the use for this also. If it isn't available in the twain control itself you could probably do an automatic conversion behind the seens with the GDPicture control but this might be too slow for a normal (and High) speed autofeed duplex scanning app. with many documents. Loic might know a more streamlined way to do this without bogging down an app.
Hi,
You can do like that (visual basic sample):
Regards,
Loïc
You can do like that (visual basic sample):
Code: Select all
Dim nImageID As Long
twain1.TwainOpenDefaultSource
twain1.TwainSetErrorMessage (True)
twain1.TwainSetHideUI (True)
twain1.TwainSetCurrentPixelType (TWPT_RGB)
twain1.TwainSetCurrentBitDepth (8)
nImageID = twain1.TwainAcquireToImageID(Me.hWnd)
twain1.TwainCloseSource
If nImageID <> 0 Then
'save as 24bpp
twain1.SaveAsTiff ("tif24bpp")
'now save as 1bpp
twain1.ConvertTo1Bpp
twain1.SaveAsTiff ("tif1bpp")
twain1.CloseImage (nImageID)
End If
Regards,
Loïc
Who is online
Users browsing this forum: No registered users and 2 guests