Anyone used EZTWAIN + DELPHI + TImage components?

Hello all,

I am creating a project where the user can scan a diagram, and save it
to file in the appropriate directory(s).

I am using twain to do this compliments of EZTWAIN.DLL and EZTWAIN.PAS.

EZTWAIN acquires the image as a HBitmap type.

I first could not figure out how to pass this bitmap to the TImage
component as is using the HBitmap Handle, so I Write it to a temporary
file using a function in the .DLL ---

TWAIN_WriteNativeToFilename(Hbmp,pFileName);

I pass the HBitmap handle, and a filename (TempScan.BMP) to the function
to save it to a temporary file on disk, and then reload it into the
TImage component.

HERE'S the BIG PROBLEM!
---------------------------
This seemed to work fine until I realized the file I later wrote to disk
using the TImage procedure TImage.Bitmap.WriteToFile(aFilename) was
writing the bitmap to a file over 10 times the original size!

If I scan, and use the EZTWAIN procedure mentioned above to save the
image to "TempScan.bmp" and the file it let's say, 277k..  After using
the TImage method LoadFromFile() and then WriteToFile() creates a bitmap
in excess of 6 megs!

Can someone please tell me why this might be happening?

Please respond E-mail as well as in the News Forum..

Thanks so much!

Rkr
--

          \|||/
          /'^'\
         ( 0 0 )
-----oOOO--(_)--OOOo----------
Reid Roman
E-Mail : rkro...@pacbell.net
Delphi Enthusiast, Hobbiest ..
U.S.A
------------------------------