Page 1 of 1

How to use memory transfermode

Posted: Wed Nov 25, 2009 7:01 pm
by DirkMattner
Hi Alex,

is there an example using TransferMode.Memory? How do i access the image? In wich format is it? Is it possible to get a compressed image?

Best regards,
Dirk

Re: How to use memory transfermode

Posted: Thu Nov 26, 2009 9:26 am
by Alex
Hello Dirk,

You can set the VSTwain.TransferMode property to TransferMode.Memory and library will use Memory transfer mode.

Compression in Memory transfer mode is not supported in current version of library and will be available in next version.
Access to "raw" image data is not supported and will not be available.

Best regards, Alexander

Re: How to use memory transfermode

Posted: Thu Nov 26, 2009 10:14 am
by DirkMattner
Hi Alex,

that is clear, i've alleready tried this. But it's unclear which format the scanned image is and wich properties are to set before acquiring images. Wich method is to use to get the scanned image? Here is my code the resulting stream/file is not usable. At least for me:-):

Code: Select all


            VSTwain1.TransferMode = TransferMode.Memory;
            VSTwain1.TiffCompression = TiffCompression.None;
            VSTwain1.FileFormat = FileFormat.Tiff;

in VSTwain1_ImageAcquiredEvent i used follwing code to get the image

              MemoryStream s = VSTwain1.GetImageAsStream(i, ImageFileFormat.TIFF);

After that i've got a stream but i don't know in wich format it is. It's not a tiff even not a BMP. What is it?

Best regards,
Dirk

Re: How to use memory transfermode

Posted: Thu Nov 26, 2009 10:21 am
by Alex
What scanner do you use? Maybe your scanner use compression in Memory transfer mode by default? You can disable usage of compression with ICAP_COMPRESSION capability of scanner.

Please generate the log-file and send it to support@vintasoft.com.

Here are steps which you should do if you want to generate a log-file of scanner's work:
  • Set the IsLoggingEnabled property to True before the StartDevice method.
  • Set the path to log-file with the LogFilePath property if path "c:\vstwain.log" is not accessible by your application.
    NOTE: vstwain.log file will be created in the user's temporary directory if path specified in the LogFilePath property is not accessible.
  • Run your application.
  • Send us a log-file and detailed description of the problem.
Best regards, Alexander

Re: How to use memory transfermode

Posted: Mon Nov 30, 2009 2:14 pm
by DirkMattner
Hi Alex,

the problem is solved. In memory transfer mode the scanner (innotec scamax 402 cd) sends the data always compressed if you are scanning black/white images regardless your settings for the compressiontype. If your 're scanning gray or colored images the data is send uncompressed regardless your settings for the compressiontype.

best regards
dirk

Re: How to use memory transfermode

Posted: Mon Nov 30, 2009 2:56 pm
by Alex
Hi Dirk,

Thank you for the information. Where can I find information about "innotec scamax 402 cd" scanner?
I want to add it to our "white" list on the forum.

Best regards, Alexander

Re: How to use memory transfermode

Posted: Mon Nov 30, 2009 3:36 pm
by DirkMattner
Hi Alex,

here http://www.inotec.eu/index.php?id=15 you can get some information about the scanner.

Best regards
Dirk