Image processing made easy!

ImageKit WPF: Frequently Asked Questions

Below are a few of the most frequently asked questions by users of the ImageKit WPF. Click on the question number to jump to the answer.

No. Question Date
8 Q. I am logging in to Windows with a user account with Administrator privileges, and even though my ImageKit license authentication has been completed correctly, an error "Invalid license" occurs when trying to paste ImageKit control etc. in the development environment. What can I do? 2018/06/05
  A. The ImageKit WPF writes information about the product version in the registry at the time of installation. This is separate from license authentication. Even if Administrator privileges are granted in a general user account, this account is not able to write the necessary information into the registry. That is why the error occurs.

In this case, you will need to install ImageKit WPF using the "Run as administrator" option.
Specifically, right-click Setup.exe and install it as “Run as administrator”, or if using ImageKitWPF.msi, install it from the command line using “Administrator Installation Options”. The syntax is as follows:

msiexec / i ImageKitWPF.msi

(* Please run your development environment with administrator permissions as well.)
7 Q. Is it possible to use code to retrieve and edit information on existing annotation objects? / Is it possible to use code to do the same thing as right-clicking on an object and changing the contents in the dialog box displayed from "Properties"? 2017/11/20
  A. Yes, this is possible.
It is possible to retrieve and set the various properties of each selected object using the "ImageKit.Edit.SelectObject xxxxx" property. In the example code below, the objects are selected in order, then depending on the object and the conditions for setting the appropriate information, the necessary processing is performed.

* Example: If the object type is a straight line, change the color to blue

For i As Integer = 1 To imageKit1.Edit.NumberOfObjects
   If imageKit1.Edit.SelectedObjectKind = Newtone.ImageKit.Win.KindOfEdit.Line Then
      imageKit1.Edit.SelectedObjectForeColor = Colors.Blue
   End If

for (int i = 1; i <= imageKit1.Edit.NumberOfObjects; i++)
   if (imageKit1.Edit.SelectedObjectKind == KindOfEdit.Line)
      imageKit1.Edit.SelectedObjectForeColor = Colors.Blue;
6 Q. If an application using ImageKit WPF is not connected to the Internet, it will take a long time to start. Is there a workaround? 2017/11/20
  A. Since the ImageKit WPF assembly (dll) is digitally signed, the CRL ("Certificate Revocation List") download process is performed to check the validity of the assembly used by the application. The slow start of applications in an environment that is not connected to the Internet is due to repeated attempts to download the CRL until a timeout occurs.

As a workaround when using it on a machine that is not connected to the Internet, follow the procedure below to prevent CRL download. (ImageKit WPF can be used even if CRL is not downloaded.)

   1. Run Control Panel -> Internet Options.
   2. In the Internet Properties dialog, select the Advanced tab.
   3. Uncheck the box next to “Confirm publisher certificate revocation”.

You can also disable signature verification at application startup by adding the following line to the application name .exe.config:

         <generatePublisherEvidence enabled="false"/>

The product The ImageKit.WPF also includes an assembly (dll) without a digital signature.
5 Q. Can I use TWAIN with 64-bit applications? 2017/11/20
  A. Yes, you can build your application with [Any CPU] or [x64] and use a 64-bit scanner driver.  
4 Q. When effect and scan processing are executed in Visual Studio debug mode, it is considerably slower than running the EXE. What should I do? 2017/11/20
  A. Disable the Managed Debug Assistant (MDA). See below for details.
3 Q. How do I create a multi-tiff file? 2017/11/20
  A. Please refer to the following code examples:

1. When saving images acquired from scanners and digital cameras
Dim Ret As Boolean
ImageKit1.File.FileName = "abc.tif"

ImageKit1.Scan.Transfer = Newtone.ImageKit.ScanTransfer.Memory 'or Newtone.ImageKit.ScanTransfer.Native
Ret = ImageKit1.Scan.Execute()

'Use this event to retrieve the scanned image
Private Sub ImageKit1_AfterScan(ByVal sender As Object, ByVal e As Newtone.ImageKit.AfterScanEventArgs) Handles ImageKit1.AfterScan
'Execute either of the commands below
'To add the scanned image to the end of the multipage tiff image
ImageKit1.File.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1)
'To insert the scanned image as the 3rd page of a miltipage tiff image
ImageKit1.File.InsertPageIntoMultipageTiff(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1, 3)
End Sub

bool Ret;
imageKit1.File.FileName = "abc.tif";

imageKit1.Scan.Transfer = Newtone.ImageKit.ScanTransfer.Memory //or Newtone.ImageKit.ScanTransfer.Native
Ret = imageKit1.Scan.Execute();

//Use this event to retrieve the scanned image
private void imageKit1_AfterScan(object sender, Newtone.ImageKit.AfterScanEventArgs e)
//Execute either of the commands below
//To add the scanned image to the end of the multipage tiff image
imageKit1.File.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1);
//To insert the scanned image as the 3rd page of a miltipage tiff image
imageKit1.File.InsertPageIntoMultipageTiff(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1, 3);

2. When saving multiple image files in one file
Dim I As Integer

ImageKit2.File.FileName = "abc.tif"

ImageKit1.LayerNumber = -1
ImageKit1.File.LoadPage = 0

'save images 001.jpg....005.jpg into one file
For I = 1 To 5
   ImageKit1.File.FileName = I.ToString("d03") + ".jpg" 'Filename
   ImageKit2.File.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1)
Next I

int i;

imageKit2.File.FileName = "abc.tif";br />
imageKit1.LayerNumber = -1;
imageKit1.File.LoadPage = 0;

//save images 001.jpg....005.jpg into one file
for (i = 1; i <= 5; i++)
   imageKit1.File.FileName = i.ToString("d03") + ".jpg"; //filename
   imageKit2.File.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFNoncompressed, e.Bitmap1);

2 Q. Can I use effects processing and scan processing as classes instead of components? 2017/11/20
  A. Yes, you can.
Please refer to the class library reference included with the ImageKit.WPF
1 Q. I have been using the ImageKit WPF for about 2 weeks and it stopped working! What should I do? 2017/11/20
  A. You need to check to see if your license has been activated. For details about license activation, please check the folder called "Tool\Activation" under the directory where you installed the ImageKit WPF. Details about license activation are explained in the "activation.pdf".