This project has moved. For the latest updates, please go here.

about use memory model Scan image

Dec 13, 2014 at 8:27 PM
hey Saraff
i use your saraff.twain longtime
i download your new version saraff.twain
but i use memory model scan image
system report error

在 System.ArgumentException 中第一次偶然出现的“System.Drawing.dll”类型的异常
ArgumentException: 参数无效。
在 System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
在 System.Drawing.Image.FromStream(Stream stream)
在 zcscan.ZcScanMainC._twain32_AcquireCompleted(Object sender, EventArgs e) 位置 D:\My Documents\Visual Studio 2010\Projects\zcscan\zcscan\ZcScanMainC.cs:行号 245

line 245 code is

this.CurrentBitmap = System.Drawing.Image.FromStream(TiffMemXfer.Current.Writer.BaseStream) as System.Drawing.Bitmap;


if i use native model
not hava this error

Dec 14, 2014 at 2:43 PM
Hello, JohnnyLeung!
In the memory mode the Saraff.Twain.NET transfer only raw pixel data. Your the application must create an image from the raw data. So you will need to look an error in code of your application.
Marked as answer by SARAFF on 1/6/2015 at 8:42 AM