This section describes how to upgrade from ScanFix Xpress 6 to ScanFix Xpress 7. While generally you'll be able to replace ScanFix Xpress 6 with ScanFix Xpress 7, there are a few important changes you may need to consider. This section provides information about those changes.
Changes and New Properties/Methods
ScanFix Xpress 7 introduces changes to the its API as described in this section.
In addition to the new image enhancements added to ScanFix Xpress 7, API changes were made to ensure that the ScanFixXpress product was even easier to use.
To replace ScanFix Xpress V6 with V7, you need to make some code changes as some of the API in V6 has been either removed or replaced. The following is a guide to make the upgrade as smooth as possible.
Required Changes
Licensing
- First off, the runtime licensing scheme is changed completely in V7, but you can replace the existing with at most 3 lines of code. See Upgrading Runtime Licensing for code examples.
- Secondly, the deprecated EvaluationChoice API in V6 has been removed in V7, and you will need to replace any reference to the old API with new code as the example given below to set the desired mode of evaluation.
scanFix1.Licensing.EvaluationMode = EvaluationChoice.Watermark;
- In addition,
to provide a consistent interface with our other products.
- Lastly, the following APIs have been removed from V7, any code reference of them therefore needs to be removed. There is only one edition in V7, so you will not need to use either of these interfaces at all:
-
Accusoft.ScanFixXpressSdk.License.LicenseEdition property
-
Accusoft.ScanFixXpressSdk.License.LicenseChoice class
-
Result Classes
In ScanFixXpress API, there are a series of classes representing the results of each enhancement. For example, the DeskewResults class has 4 public properties:
public int Confidence
public bool ImageWasModified
public double RotationAngle
public int Variation
In V6, these properties have read and write capability, while in V7 they are changed to read-only. Any code that tries to set these fields will not compile.
The same change is made to other classes of this nature, namely the following, so that any field of the result classes is read-only:
BlankPageDetectResults, BlankRectangleDetectResults, BlobRemovalResults, BorderRemovalResults, BrightnessContrastResults, CombRemovalResults, DeskewResults, DespeckleResults, DotShadingRemovalResults, ImageRegistrationResults, InverseTextResults, LineRemovalResults, and NegativeCorrectionResults.
Exception Handling
The types of exceptions thrown under the following scenarios are changed. The code will need to be changed accordingly if you need to catch exceptions of these methods.
- For FromHbitmap(IntPtr) or FromHdib(InPtr), if null pointers is passed in, instead of System, then InvalidOperationException, System.ArgumentNullException will be thrown.
- For FromBitmap(System.Drawing.Bitmap) or FromImage(System.Drawing.Image), if null bitmap or image is passed in, instead of no exceptions, then System.ArgumentNullException will be thrown.
Recommended Changes
Image Transfer
There are several different ways to import and export image data into ScanFix class. In V7, in addition to the existing, we have provided new interfaces to achieve that between ScanFix Xpress and other applicable Accusoft components. These new methods are recommended for their ease of use to prevent memory leaks.
Export:
-
ScanFix.CopyTo(System.Object Destination)
-
ScanFix.TransferTo(System.Object Destination)
Import:
Importing image date to a ScanFix object is achieved by passing a ScanFix object as the input parameter of the same export methods called by another Accusoft object.
For details and code examples, see Pass Image Data Between Different Accusoft Components.
Performance Changes
These do not require any code changes from your side, and are just underlying changes we made to the Deskew and BorderRemoval features to enhance their accuracy. If you are seeing different results of these operations between V7 and V6, it is expected.
New Features
Please see What is ScanFix Xpress? for the new image cleanup features in V7.
Other Miscellaneous Changes
- This release introduces the ability to easily copy or transfer image data to other Accusoft components without having to manually work with DIBs. See Pass Image Data Between Different Accusoft Components for information.
- Accusoft's new licensing structure is available in ScanFix Xpress 7. See Licensing for information about the new licensing, and Upgrading Runtime Licensing for information about updating your licensing from an earlier version of ScanFix Xpress.
![]() |
If you encounter any porting issues, please contact support@accusoft.com for assistance. |