Hello
I am new to GdPicture.NET and I am having difficulty saving an image after it has been scanned. The following is the code I am using to get the image to save to my C:
int ImageID;
int TiffID;
oGdPictureImaging.TwainOpenDefaultSource(this.Handle);
oGdPictureImaging.TwainSetHideUI(true); //Asks to the device to hide his GUI
oGdPictureImaging.TwainEnableDuplex(false);
ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(this.Handle);
TiffID = oGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(ImageID);
GdViewer1.DisplayFromGdPictureImage(ImageID);
System.Windows.Forms.Application.DoEvents();
oGdPictureImaging.TiffSaveAsMultiPageFile(TiffID, "C:\test.tif", TiffCompression.TiffCompressionAUTO);
oGdPictureImaging.ReleaseGdPictureImage(ImageID);
Saving A Scanned Image
Re: Saving A Scanned Image
Hi Reynold,
Thank you for your interest in GdPicture.NET.
I believe you should have a look at the "Creating a multipage TIFF file from a document in the scanner using the TWAIN protocol" documentation, it is available here:
https://www.gdpicture.com/guides/gdpicture/web ... tocol.html
Now this code is just a tutorial, the return code should obviously be verified.
Having a look at the code you have shared with us I believe there are two things to be done:
- as it seems it does not work, you should check the return code so you could tell us what is the faulty call and what is the result
- under many circumstances the operating systems forbids to create "c:\test.tif", you should have a try with a different location
I'm looking forward to hearing from you.
Regards,
David
Thank you for your interest in GdPicture.NET.
I believe you should have a look at the "Creating a multipage TIFF file from a document in the scanner using the TWAIN protocol" documentation, it is available here:
https://www.gdpicture.com/guides/gdpicture/web ... tocol.html
Now this code is just a tutorial, the return code should obviously be verified.
Having a look at the code you have shared with us I believe there are two things to be done:
- as it seems it does not work, you should check the return code so you could tell us what is the faulty call and what is the result
- under many circumstances the operating systems forbids to create "c:\test.tif", you should have a try with a different location
I'm looking forward to hearing from you.
Regards,
David
Who is online
Users browsing this forum: No registered users and 1 guest