Need to Save Scanned Image in gif format.
Posted on 2005-05-03
I have a database that uses the Kodak ActiveX controls to scan drawings and save them to a network drive. It's been working so-so.
If the resolution is set too high...say 200 dpi (not as high as we really need it)...then the scanned image will not be displayed on the ImgEdit control.
The example database I found includes the following code to save the image. I've been using this without the second argument, and it works, but it produces huge file sizes. I presume this is because it is not compressing it to the file format but writing it out uncompressed. Note that I am not using this routine. My own does not use the ScanAdmin.ShowFileDialog line to get a file type. Instead every image is to be saved to the same directory with the same filetype.
I've been giving the files a .tif extension manually. What I would really like to do is save the file in gif format, compression and all...so that the drawings are more readable.
Dim strFilter As String
Dim strInputFileName As String
strInputFileName = Me.ScanAdmin.Image
If Len(strInputFileName) > 0 Then
Select Case Right(strInputFileName, 3)
Me.scanEdit.SaveAs strInputFileName, 1
Me.scanEdit.SaveAs strInputFileName, 6