ScanFix Xpress v9.0 for .NET - Updated
Import Image Data to ScanFix Xpress
User Guide > How To > Import and Export Images > Import Image Data to ScanFix Xpress

FromHdib(System.IntPtr hdib), FromBitmap(System.Drawing.Bitmap bitmap), FromHbitmap(System.IntPtr hbitmap), FromImage(System.Drawing.Image  image) allow you to load image data from a variety of types to ScanFix Xpress. You may use them to pass image data from either applicable Accusoft objects, or any compatible data external to Accusoft. Among these formats, Hdib is the preferred one for performance reasons.

To make it even easier for passing images between Accusoft components, an additional methods, CopyTo()  and TransferTo() was added to our components, including ScanFix Xpress. It is the preferred way of handling image data for a number of reasons. See Pass Image Data Between Different Accusoft Components for details.

From Accusoft components

The following C# code demonstrates importing from Accusoft’s ImagXpress component.

C# Example
Copy Code
using Accusoft.ImagXpressSdk;
using Accusoft.ScanFixXpressSdk;
……
ScanFix scanFix1 = new ScanFix();
ImagXpress imagXpress1 = new ImagXpress();
ImageX imageX = new ImageX(imagXpress1, 50, 50, 24, Color.Red);
imageX.CopyTo(scanFix1);
OR
imageX.TransferTo(scanFix1);
OR
scanFix1.FromHdib(imageX.ToHdib(false));
OR
scanFix1.FromHbitmap(imageX.ToHbitmap(false));
OR
scanFix1.FromBitmap(imageX.ToBitmap(false));

Outside of Accusoft components

C# Example
Copy Code
System.Drawing.Bitmap bitmap = new Bitmap(@"C:\image.bmp");
scanFix1.FromBitmap(bitmap);
OR
scanFix1.FromImage(bitmap);
OR
scanFix1.FromHbitmap(bitmap.GetHbitmap());

 

Is this page helpful?
Yes No
Thanks for your feedback.