Image processing made easy!

ImageKit9 VCL: Frequently Asked Questions

Below are a few of the most frequently asked questions by users of the ImageKit9 VCL.

No. Question Date
35 Q. When I try to run my application, I get an error. This happens on my development PC or on the deployment PC eventhough the BPL and DLL files are installed correctly. What is going on? 2016/03/31
  A. Please download and install the Microsoft Visual C++ 2010 Redistributable Package. There are separate packages for 64bit and 32bit operating systems.
Microsoft Visual C++ 2010 Redistributable Package (x64)
Microsoft Visual C++ 2010 Redistributable Package (x86)
 
34 Q. There are Tiff (Jpeg compression) images that the ImageKit9 VCl can load and other Tiff (Jpeg compression) images that it cannot load. What is the difference between these images? 2016/03/31
  A. Tiff (Jpeg compression) images whose compression tag is 6 (old compression format) cannot be loaded into the ImageKit. Tiff (Jpeg compression) images whose compression tag is 7 (new compression format) can be loaded into the ImageKit.  
33 Q. How can I "mirror" or "flip" an image? 2016/03/31
  A. Use the Effect.Rotation method. Set the angle parameter to 0. Then, to "mirror" the image, set the TurnX parameter to true. This will reverse the image along the X axis. To "flip" the image, set the TurnY parameter to true. This will reverse the image along its Y axis.  
32 Q. When drawing text or shapes on an image, if I have to draw many things, my program slows down. Is there a way to speed up drawing? 2016/03/31
  A. When drawing text or shapes multiple times on a single image, instead of using the PrintDraw method and drawing directly to the ImageHandle, draw to the ImageHdc. Once the drawing is complete, execute the Edit.Modify method to transfer changes from the Image.Hdc to the ImageHandle.

With the ImageKit9 DLL version, there is no Editing mode so there is no way to shorten the drawing time.
 
31 Q. I have an image with a the bitcount of 8 or less (1 bit Black and white, 16 colors, 256 colors) and I want to draw text or shapes on it. How can I know what colors are available? 2016/03/31
  A. You can only draw using the colors that are available in the image's color palette. To find out what color palette the image uses, execute the GetPaletteFromImage method (or the IKGetPalette function)  
30 Q. Using a custom-built scan interface (Scan.UIMode=2), how can I scan multiple areas on the same paper? 2016/03/31
  A. It is not possible to scan multiple areas simultaneously so you must execute the scan multiple times:

Example: Scanning multiple times from the document plate

In C++Builder:
if (VImageKit1->Scan->Initialize(1, 0, "1.00", "NEWTONE Corp. ", "ImageKit", "ImageKit9 Scan Sample") == false) return;
VImageKit1->Scan->ClearProperty();
VImageKit1->Scan->DataSourceName = "xxxxxxx";
  //Datasource name
if (VImageKit1->Scan->OpenDataSource() == false)
{
   VImageKit1->Scan->Terminate();
   return;
}

VImageKit1->Scan->TransferMode = vikScanMemory;
VImageKit1->Scan->Compression = vikScanNoCompress;
VImageKit1->Scan->UiMode = vikScanNONUI;
VImageKit1->Scan->ScanMode = vikScanDOC;
VImageKit1->Scan->UnitMode = vikScanInch;
VImageKit1->Scan->PaperSize = 0;
 //or default value

//First scan
//set the scanning area

VImageKit1->Scan->RectLeft = 0;
VImageKit1->Scan->RectTop = 0;
VImageKit1->Scan->RectRight = 1;
VImageKit1->Scan->RectBottom = 1;

//set other necessary properties here
VImageKit1->Scan->Execute();

//Second scan
//set the scanning area

VImageKit1->Scan->RectLeft = 3;
VImageKit1->Scan->RectTop = 3;
VImageKit1->Scan->RectRight = 4;
VImageKit1->Scan->RectBottom = 4;

//set other necessary properties here
VImageKit1->Scan->Execute();

VImageKit1->Scan->CloseDataSource();
VImageKit1->Scan->Terminate();


In Delphi:
if VImageKit1.Scan.Initialize(1, 0, '1.00', 'NEWTONE Corp. ', 'ImageKit', 'ImageKit9 Scan Sample') = False then Exit;
VImageKit1.Scan.ClearProperty;
VImageKit1.Scan.DataSourceName := 'xxxxxxx';
  //Datasource name
if VImageKit1.Scan.OpenDataSource = False then
begin
   VImageKit1.Scan.Terminate;
   Exit;
end;

VImageKit1.Scan.TransferMode := vikScanMemory;
VImageKit1.Scan.Compression := vikScanNoCompress;
VImageKit1.Scan.UiMode := vikScanNONUI;
VImageKit1.Scan.ScanMode := vikScanDOC;
VImageKit1.Scan.UnitMode := vikScanInch;
VImageKit1.Scan.PaperSize := 0;
 //or default value

//First scan
//set the scanning area

VImageKit1.Scan.RectLeft := 0;
VImageKit1.Scan.RectTop := 0;
VImageKit1.Scan.RectRight := 1;
VImageKit1.Scan.RectBottom := 1;

//set other necessary properties here
VImageKit1.Scan.Execute;

//Second scan
//set the scanning area

VImageKit1.Scan.RectLeft := 3;
VImageKit1.Scan.RectTop := 3;
VImageKit1.Scan.RectRight := 4;
VImageKit1.Scan.RectBottom := 4;

//set other necessary properties here
VImageKit1.Scan.Execute;

VImageKit1.Scan.CloseDataSource;
VImageKit1.Scan.Terminate;


Note: Appropriate code to display or save scanned data should be written in the AfterScan event. Also see Item No. 26. When using an ADF, you cannot continuously scan the same paper so you'll need to put the same paper back into the ADF and execute scan again.
 
29 Q. I have built my own scan interface (Scan.UIMode = 2) and would like to be able to use the scanner's automatic paper detection functions. How do I do that? 2016/03/31
  A. To confirm that your scanner supports automatic paper detection, use the IsCapSupported method (ImageKit VCL version) or the IKIsCapSupported function (ImageKit DLL version).

If the scan datasource supports automatic detection, set the PaperSize to 1000 (undefined) and the BorderDetection to True (0 in DLL version). For some datasources, the BorderDetection property value is ignored.
 
28 Q. I am trying to use a 4 bit color (16 colors) image in the Layer property with transparency but I am having trouble. What should I do? 2016/03/31
  A. There are cases when there are too few colors in the palette and transparency will not work. Use the ConvertColor method to increase the colors to 8 bit color.  
27 Q. When using the PrintDraw interface's DrawText method (or the Print DLL's IKDrawText function) and I set the space between characters (CharExtra > 0), some characters overlap. What should I do? 2016/03/31
  A. Use the TextOut method (DLL IKTextOut function) instead.  
26 Q. I have built a custom scan interface and want scan to only a portion of a document. How can I do that ? 2016/03/31
  A.
(1) When the scan datasource supports defined paper sizes:
Set the scan area and then set the PaperSize property to 0 or to the default value.

(2) When the scan datasource does not support defined paper sizes:
Set the scan area and then set the PaperSize property to 0

For more details, please refer to the PaperSize property's explanation in the Help documentation. To retrieve the paper sizes supported by the scan datasource, please use the ScanGetCapEnum method (In ImageKit9 DLL version, use the IKScanGetCapEnum function).
 
25 Q. Does the ImageKit9 VCL support SVG compressed image format? 2016/03/31
  A. No, the ImageKit9 VCL does not support SVG compressed image format.  
24 Q. I want to delete a specific page in a multipage file. How can I do that? 2016/03/31
  A. There is no direct function in the ImageKit9 for deleting a specified page in a multipage file. Therefore, you must create a temporary file and save all the required pages in their proper order, leaving out the page that you want to delete.

Example: Deleting the third page of a multipage tiff file...

In C++Builder:
int i, SaveType;
UnicodeString AppPath;

//The temporary file name
VImageKit2->FileIO->FileName = AppPath + "\\temp.tif";

//Enable TiffAppend for creating multipage tiff files
VImageKit2->FileIO->TiffAppend = true;

VImageKit1->LayerNo = -1;
VImageKit1->FileIO.FileName = AppPath + "\\abc.tif";
//The file name
if (VImageKit1->FileIO->GetImageFileType() == false) return;
//Used by SaveFile method. This will save the file in the same format.
SaveType = VImageKit1->FileIO->FileType - 3;


for (i = 1; i <= VImageKit1->FileIO->FileMaxPage)
{
   if (i == 3) continue;
   VImageKit1->FileIO->LoadPage = i - 1;
   VImageKit1->FileIO->LoadFile(vikLoad);

   VImageKit2->FileIO->SaveFile((TVIkSaveFile)SaveType, VImageKit1->ImageHandle);
}
DeleteFile(VImageKit1->FileIO->FileName);
//delete file
RenameFile(VImageKit2->FileIO->FileName, VImageKit1->FileIO->FileName); //Change file name

In Delphi:
i, SaveType: Integer;
AppPath: string;

//The temporary file name
VImageKit2.FileIO.FileName := AppPath + '\temp.tif';

//Enable TiffAppend for creating multipage tiff files
VImageKit2.FileIO.TiffAppend := True;

VImageKit1.LayerNo := -1;
VImageKit1.FileIO.FileName := AppPath + '\abc.tif';
//The file name
if VImageKit1.FileIO.GetImageFileType() = False then Exit;
//Used by SaveFile method. This will save the file in the same format.
SaveType := VImageKit1.FileIO.FileType - 3;


for i := 1 to VImageKit1.FileIO.FileMaxPage do
begin
   if i = 3 then Continue;
   VImageKit1.FileIO.LoadPage := i - 1;
   VImageKit1.FileIO.LoadFile(vikLoad);

   VImageKit2.FileIO.SaveFile(TVIkSaveFile(SaveType), VImageKit1.ImageHandle);
end;
DeleteFile(VImageKit1.FileIO.FileName);
//delete file
RenameFile(VImageKit2.FileIO.FileName, VImageKit1.FileIO.FileName); //Change file name
 
23 Q. I know the ImageKit9 VCL supports TWAIN Standard Capability but what about Custom Capability? 2016/03/31
  A. Yes, the ImageKit9 VCL supports Custom Capability from the following 4 scanner manufacturers; Epson, Panasonic, Canon, and PFU (Fujitsu).

1.)Epson:
Scanning Speed
Unsharpness Mask
Moire Filter
Autodetect Paper Size
Gamma Adjustment
B&W/Color Ratio Detection
Skip Blank Page
Punch Hole Removal
Focus Point Adjustment
Character Enhancement
Reflective Scanning / Positive Film

2.) Panasonic
B&W/Color Detection
Dynamic Threshold
Scanning Speed
Image Quality
Deskew Smoothing
Multistream
Skip Blank Page
Punch Hole Removal

3.) Canon DR
Dropout Color
Autodetect Paper Size
Moire Filter
B&W/Color Detection
Image Rotation
Text Orientation Detection
Edge Enhancement
Skip Blank Page
Punch Hole Removal
Text Enhancement
Multistream

4.) PFU
B&W/Color Detection
Multistream
Moire Filter
Border Enhancement
Punch Hole Removal
 
22 Q. What is the version of SXF that is supported by the ImageKit9 VCL? 2016/03/31
  A. The ImageKit9 VCL supports version 3 level 2. However, there are some items, hatching for example, that are not supported.  
21 Q. In the image-editing toolbar, there is an "Undo" command. Is it possible to also do a "Redo"? 2016/03/31
  A. No, a "Redo" is not possible.  
20 Q. Is it possible to edit a vector image without using the image-editing toolbar? 2016/03/31
  A. No, it is not possible. Unfortunately, the commands used to draw vector images are not public so they cannot be accessed directly to edit vector images.  
19 Q. Even though I draw text to the memory handle of an raster image in the ImageKit Control's Layer interface, the text will not display! 2016/03/31
  A. For images displayed in the ImageKit Control's Layer interface, transparency information is loaded when the memory handle of the image is passed into the Layer.ImageHandle property. Drawing to the image after this transparency information has been loaded will mean the the drawing may not be displayed. Because the transparency information must be updated, set the Layer.Transparent property to False before drawing to the image or pass the image's memory handle to a variable, draw to that image and then pass the value into the ImageHandle property.

Example:
1.) Setting the Transparent property to False:

In C++Builder
bool Ret;

//Assumes that a raster image has already been set into the Layer interface
VImageKit1->Layer[0]->Transparent = false; // first set the transparent property to false.
VImageKit1->PrintDraw->ClearProperty();
VImageKit1->PrintDraw->FontName = "Arial"
VImageKit1->PrintDraw->TextForeColor = clRed;
VImageKit1->PrintDraw->FontSize = 10;
VImageKit1->PrintDraw->FontBold = true;
VImageKit1->PrintDraw->FontItalic = true;
VImageKit1->PrintDraw->Transparent = true;
VImageKit1->PrintDraw->Text = "Here is some text"
Ret = VImageKit1->PrintDraw->TextOut(VImageKit1->Layer[0]->ImageHandle, 20, 20, vikMemoryHandle);
VImageKit1->Layer[0]->Transparent = true; //Now you can set the transparent property back to true.
VImageKit1->Refresh();

In Delphi
Ret: Boolean;

//Assumes that a raster image has already been set into the Layer interface
VImageKit1.Layer[0].Transparent := False; // first set the transparent property to false.
VImageKit1.PrintDraw.ClearProperty;
VImageKit1.PrintDraw.FontName := "Arial"
VImageKit1.PrintDraw.TextForeColor := clRed;
VImageKit1.PrintDraw.FontSize := 10;
VImageKit1.PrintDraw.FontBold := True;
VImageKit1.PrintDraw.FontItalic := True;
VImageKit1.PrintDraw.Transparent := True;
VImageKit1.PrintDraw.Text := "Here is some text"
Ret := VImageKit1.PrintDraw.TextOut(VImageKit1.Layer[0].ImageHandle, 20, 20, vikMemoryHandle);
VImageKit1.Layer[0].Transparent := True; //Now you can set the transparent property back to true.
VImageKit1.Refresh;

2.) Using a variable to hold the image memory handle

In C++Builder
UINT ImageHandle;
bool Ret;

//Assumes that a raster image has already been set into the Layer interface
ImageHandle = VImageKit1.Layer[0].ImageHandle; //pass the image into the variable declared above

VImageKit1->PrintDraw->ClearProperty();
VImageKit1->PrintDraw->FontName = "Arial"
VImageKit1->PrintDraw->TextForeColor = clRed;
VImageKit1->PrintDraw->FontSize = 10;
VImageKit1->PrintDraw->FontBold = true;
VImageKit1->PrintDraw->FontItalic = true;
VImageKit1->PrintDraw->Transparent = true;
VImageKit1->PrintDraw->Text = "Some Text"
//Draw to the memory handle of the image stored in the variable
Ret = VImageKit1->PrintDraw->TextOut(ImageHandle, 20, 20, vikMemoryHandle);
VImageKit1->Layer[0].ImageHandle = ImageHande; //pass the image, with the text drawn on it, into the Layer.ImageHandle property
VImageKit1->Refresh();

In Delphi
ImageHandle: THandle;
Ret: Boolean;

//Assumes that a raster image has already been set into the Layer interface
ImageHandle := VImageKit1.Layer[0].ImageHandle; //pass the image into the variable declared above

VImageKit1.PrintDraw.ClearProperty;
VImageKit1.PrintDraw.FontName := "Arial"
VImageKit1.PrintDraw.TextForeColor := clRed;
VImageKit1.PrintDraw.FontSize := 10;
VImageKit1.PrintDraw.FontBold := True;
VImageKit1.PrintDraw.FontItalic := True;
VImageKit1.PrintDraw.Transparent := True;
VImageKit1.PrintDraw.Text := "Some Text"
//Draw to the memory handle of the image stored in the variable
Ret := VImageKit1.PrintDraw.TextOut(ImageHandle, 20, 20, vikMemoryHandle);
VImageKit1.Layer[0].ImageHandle := ImageHande; //pass the image, with the text drawn on it, into the Layer.ImageHandle property
VImageKit1.Refresh;
 
18 Q. How can I create a multipage tiff file? 2016/03/31
  A. Please refer to the example below:

1. When saving images retrieved from a document scanner or digital camera:
In C++Builder:
bool Ret;
VImageKit1->FileIO->FileName = "abc.tif";
//the filename
VImageKit1->FileIO->TiffAppend = true; //creates a multipage tiff
VImageKit1->Scan->TransferMode = vikScanMemory; //or ikScanNative
Ret = VImageKit1->Scan->Execute(); //scan

//save the file in the AfterScan event....

void __fastcall TForm1::VImageKit1AfterScan(TObject *Sender, NativeUInt/*or DWORD*/ DibHandle, NativeUInt/*or DWORD*/ OrgHandle, int ImageCount, short BitOrder)
{
     VImageKit1->FileIO->SaveFile(vikSaveTIFFNoncompressed, DibHandle);
}


In Delphi:
Ret: Boolean
VImageKit1.FileIO.FileName := 'abc.tif';
//the filename
VImageKit1.FileIO.TiffAppend := True; //creates a multipage tiff
VImageKit1.Scan.TransferMode := vikScanMemory; //or ikScanNative
Ret := VImageKit1.Scan.Execute(); //scan

//save the file in the AfterScan event....

procedure TForm1.VImageKit1AfterScan(Sender: TObject; DibHandle, OrgHandle: NativeUInt{or Cardinal}; ImageCount: Integer; BitOrder: Smallint);
begin
     VImageKit1.FileIO.SaveFile(vikSaveTIFFNoncompressed, DibHandle);
end;


Note: if the datasource supports file transfer of multipage tiff then it is not necessary to use the File interface at all and you can create multipage tiff images using just the Scan interface properties.

2. To load multiple image files and save them within one multipage file
In C++Builder
int i;
VImageKit2->FileIO->FileName = "abc.tif";
//the filename
VImageKit2->FileIO->TiffAppend = true; //multipage tiff

VImageKit1->LayerNo = -1;
VImageKit1->FileIO->LoadPage = 0;


//process images 001.jpg through 005.jpg
for (i = 0; i <= 5; i++)
{
    VImageKit1->FileIO->FileName = Format("%.3d", ARRAYOFCONST((i))) + ".jpg";
//the filename
    VImageKit1->FileIO->LoadFile(vikLoad);

    VImageKit2->FileIO->SaveFile(vikSaveTIFFNoncompressed, ImageKit1.ImageHandle);
}


In Delphi
i: Integer;
VImageKit2.FileIO.FileName := 'abc.tif';
//the filename
VImageKit2.FileIO.TiffAppend := True; //multipage tiff

VImageKit1.LayerNo := -1;
VImageKit1.FileIO.LoadPage := 0;


//process images 001.jpg through 005.jpg
for i : = 1 to 5 do
begin
    VImageKit1.FileIO.FileName := Format('%.3d', [i]) + '.jpg';
//the filename
    VImageKit1.FileIO.LoadFile(vikLoad);

    VImageKit2.FileIO.SaveFile(vikSaveTIFFNoncompressed, ImageKit1.ImageHandle);
end;
 
14 Q.What determines the size of a thumbnail image in the Thumbnail Control? 2016/03/31
  A. The size of a thumbnail image is mostly determined by the available display area within a thumbnail cell and the Thumbnail Control's ImageSize property. The thumbnail cell's size is determined by the number of rows and columns within the Thumbnail Control and the GapSize property. Once an individual cell's size is determined, the ImageSize property sets the maximum allowable size for thumbnail images within each cell.  
16 Q. How can I convert the height of an image given in pixels to inches or centimeters? 2016/03/31
  A. Please refer to the example below:

Using the VCL version (C++Builder):
float inchX, inchY;
float cmX, cmY;

VImageKit1->LayerNo = -1;
VImageKit1->FileIO->FileName = "abc.tif";
if (VImageKit1->FileIO->LoadFile(vikLoad) == false) return;

if (VImageKit1->Xdpi != 0)
{

     //inches
     inchX = 1.0 * VImageKit1->ImageWidth / VImageKit1->Xdpi;
     //convert to centimeters
     cmX = inchX * 2.54;
}
if (VImageKit1 ->Ydpi != 0)
{

     //inches
     inchY = 1.0 * VImageKit1->ImageHeight / VImageKit1->Ydpi;
     //convert to centimeters
     cmY = inchY * 2.54;
}


Using the VCL version (Delphi):
inchX, inchY: Single;
cmX, cmY: Single;

VImageKit1.LayerNo := -1;
VImageKit1.FileIO.FileName := 'abc.tif';
if VImageKit1.FileIO.LoadFile(vikLoad) = False then Exit;

if VImageKit1.Xdpi <> 0 then
begin

     //inches
     inchX := VImageKit1.ImageWidth / VImageKit1.Xdpi;
     //convert to centimeters
     cmX := inchX * 2.54;
end;
if VImageKit1.Ydpi <> 0 then
begin

     //inches
     inchY := VImageKit1.ImageHeight / VImageKit1.Ydpi;
     //convert to centimeters
     cmY := inchY * 2.54;
end;
 
15 Q. How can I enable the "Page" settings in the Print dialog when it first appears? 2016/03/31
  A. Please refer to the following example:

Using the VCL version (C++Builder):
bool Ret;
VImageKit1->PrintDraw->PrintRange = prPageNums;
VImageKit1->PrintDraw->MinPage = 1;
VImageKit1->PrintDraw->MaxPage = 3;
VImageKit1->PrintDraw->FromPage = 1;
VImageKit1->PrintDraw->ToPage = 3;
Ret = ImageKit1->PrintDraw->PrintDialog();


Using the VCL version (Delphi):
Ret: Boolean;
VImageKit1.PrintDraw.PrintRange := prPageNums;
VImageKit1.PrintDraw.MaxPage := 3;
VImageKit1.PrintDraw.FromPage := 1;
VImageKit1.PrintDraw.ToPage := 3;
Ret := ImageKit1.PrintDraw.PrintDialog();


* If the MinPage and MaxPage properties are both set to 1, the "Page" settings will not be enabled.
 
14 Q. In the Thumbnail Control, when I use Exif files, are the thumbnail images contained within the Exif files being used by the Thumbnail Control? 2016/03/31
  A. If the value of the ImageSize property is less than the Exif thumbnail image's height and width in pixels, then the Exif thumbnail image is used in the Thumbnail Control.  
13/td> Q. Everything works fine in my development environment, however, in the deployment environment I cannot use certain file formats. What should I do? 2016/03/31
  A. In the deployment environment, make sure that you have the appropriate ImageKit9 DLL files, i.e. Ik9***.dll, for that file format. When using runtime package, make sure these dll files in the same folder as the bpl. When using design time package, make sure these dll files are in the same folder as the executable (exe) or that they are in a folder within a valid path.  
12 Q. How can I copy the ImageKit control's display area to TImage? 2016/03/31
  A. Please use the following code*

In C++Builder
VImageKit1->Edit->EditEnable = true;

Image1->Width = VImageKit1->ClientWidth;
Image1->Height = VImageKit1->ClientHeight;

StretchBlt(Image1->Canvas->Handle, 0, 0, Image1->Width, Image1->Height, VImageKit1->ImageHdc, 0, 0, VImageKit1->ClientWidth, VImageKit1->ClientHeight, cmSrcCopy);

VImageKit1->Edit->EditEnable = false;

In Delphi
VImageKit1.Edit.EditEnable := True;

Image1.Width := VImageKit1.ClientWidth;
Image1.Height := VImageKit1.ClientHeight;

StretchBlt(Image1.Canvas.Handle, 0, 0, Image1.Width, Image1.Height, VImageKit1.ImageHdc, 0, 0, VImageKit1.ClientWidth, VImageKit1.ClientHeight, cmSrcCopy);

VImageKit1.Edit.EditEnable := False;
 
11 Q. Is it possible to use the image editing toolbar to edit the raster image set in the ImageKit Control's Layer property? 2016/03/31
  A. No, this is not possible. You can edit it using the PrintDraw interface's text or drawing methods. Unfortunately, the PrintDraw does not contain a stamp or airbrush capability.  
10 Q. When depending on my scan driver's version, when I preview or scan, I get an "illegal floating point error". What can I do? 2016/03/31
  A. This is a problem with the scan driver. Download the latest scan driver from the manufacturer's website and install it. If this doesn't resolve the problem then disable the FpuException.

VCL example:
In C++Builder
VImageKit1->Scan->FpuException = true;
VImageKit1->Scan->Execute();


In Delphi
VImageKit1.Scan.FpuException := True;
VImageKit1.Scan.Execute();


DLL example:
In C++Builder
Word Saved8087CW = Default8087CW;
Set8087CW(0x133f);
IKScanExec(...);
Set8087CW(Saved8087CW);


In Delphi:
var
Saved8087CW: Word;

Saved8087CW := Default8087CW;
Set8087CW($133f);
IKScanExec(...);
Set8087CW(Saved8087CW);
 
9 Q. In Delphi when I use an VImageKit.Effect method and in the first parameter I use the Slice function, when I compile I get an error stating that "Slice can't be used in an open array". What can I do? 2016/03/31
  A. Use the following code: (replace bad code in red, with good code in blue)

Use the Move procedure
VImageKit1.Effect.SelectImage(Slice(Pt, Points), 255, 255, 255);

var Pt_Slice: array of TPoint;
SetLength(Pt_Slice, Points);
Move(Pt, Pt_Slice[0], SizeOf(TPoint) * Points);
VImageKit1.Effect.SelectImage(Pt_Slice, 255, 255, 255);


Don't pass the Slice function in directly, use it as a parameter of a different function
VImageKit1.Effect.SelectImage(Slice(Pt, Points), 255, 255, 255);

SelectImageSub(Slice(Pt, Points));
procedure TForm1.SelectImageSub(const Pt: array of TPoint);
begin
   VImageKit1.Effect.SelectImage(Pt, 255, 255, 255);
end;
 
8 Q. How can I print without displaying the Select Printer common dialog? 2016/03/31
  A. Please refer to the following example:

1. To use the default printer...
In C++Builder:
bool Ret;
VImageKit1->PrintDraw->PrintFileName = "Default";
Ret = ImageKit1->PrintDraw->PrintCreateDC(vikPrintFileName);
if (Ret == false) return;

//printing code goes here.....

In Delphi:
Ret: Boolean
VImageKit1.PrintDraw.PrintFileName := 'Default';
Ret := ImageKit1.PrintDraw.PrintCreateDC(vikPrintFileName);
if Ret = False then Exit;

//printing code goes here.....

2. To specify a printer....
In C++Builder
bool Ret;
//Set the name of the printer, retrieved by the EnumPrinters method, into the PrinterName property...
VImageKit1->PrintDraw->PrinterName = "xxxxxx";
Ret = VImageKit1->PrintDraw->PrintCreateDC(vikPrinterName);
if (Ret == false) return;

//printing code.....

In Delphi
Ret: Boolean
//Set the name of the printer, retrieved by the EnumPrinters method, into the PrinterName property...
VImageKit1.PrintDraw.PrinterName := 'xxxxxx';
Ret := VImageKit1.PrintDraw.PrintCreateDC(vikPrinterName);
if Ret = False then Exit;

//printing code.....

Regarding 1 and 2 above, if you want to change print conditions, the retrieve the DEVMODE structure using the GetDevModeHandle method. Then using SetDevModeInfo set the print conditions that you want and execute the PrintCreateDC method. With both the Print interface and the Print DLL, if you want to exectue SetDevModeInfo, you must first execute GetDevModeInfo. (in Print DLL the function names are preceeded by "IK")
 
7 Q. I want to print an image so that it fills the printable area for a given paper size. 2016/03/31
  A. Use the PrintDraw interface's GetPaperSize method to retrieve the printable area and then output the image using ImageOut.

VCL example (C++Builder):
bool Ret;
int ALeft, ATop, ARight, ABottom, AWidth, AHeight;

//retrieve paper size and printable area
Ret = VImageKit1->PrintDraw->GetPaperSize(DC, ALeft, ATop, ARight, ABottom, AWidth, AHeight, vikPrinterPixel);
//print image in printable area
Ret = VImageKit1->PrintDraw->ImageOut(DC, ImgHandle, 0, 0, ARight - ALeft, ABottom - ATop, false, true, vikPrinterPixel);

VCL example (Delphi):
Ret: Boolean;
ALeft, ATop, ARight, ABottom, AWidth, AHeight: Integer;

//retrieve paper size and printable area
Ret := VImageKit1.PrintDraw.GetPaperSize(DC, ALeft, ATop, ARight, ABottom, AWidth, AHeight, vikPrinterPixel);
//print image in printable area
Ret := VImageKit1.PrintDraw.ImageOut(DC, ImgHandle, 0, 0, ARight - ALeft, ABottom - ATop, False, True, vikPrinterPixel);

DLL example (C++Builder):
BOOL Ret;
RECT Rect1, Rect2;
long AWidth, AHeight;

//retrieve paper size and printable area
Ret = IKGetPaperSize(DC, &Rect1, &AWidth, &AHeight, 1);
//print image in printable area
Rect2.left = 0;
Rect2.top = 0;
Rect2.right = Rect1.right - Rect1.left;
Rect2.bottom = Rect1.bottom - Rect1.top;
Ret = IKImageOut(DC, ImgHandle, &Rect2, FALSE, TRUE, 1);


DLL example (Delphi):
Ret: LongBool;
Rect1, Rect2: TRect;
AWidth, AHeight: Longint;

//retrieve paper size and printable area
Ret := IKGetPaperSize(DC, Rect1, AWidth, AHeight, 1);
//print image in printable area
Rect2.Left := 0;
Rect2.Top := 0;
Rect2.Right := Rect1.Right - Rect1.Left;
Rect2.Bottom := Rect1.Bottom - Rect1.Top;
Ret := IKImageOut(DC, ImgHandle, Rect2, False, True, 1);
 
6 Q. I am having problems saving an image in JPEG file format. 2016/03/31
  A. JPEG images must be either 8 bit grayscale or 24 bit color. If you are trying to save other types of images than these in the JPEG format, you must first convert the image to either 8 bit grayscale or 24 bit color. Please refer to the ConvertColor method explanation in the ImageKit9 VCL Help File.  
5 Q. When using the VCL control are the DLL files necessary? 2016/03/31
  A. Yes, some of the ImageKit9 DLL files are absolutely necessary for your program to run. Others are necessary when using certain files or functions. For more details, please refer to the page in the ImageKit9 Help File Introduction section entitled, "Distributing Applications that use the ImageKit9 VCL".  
4 Q. How can I retrieve the total number of images displayed in the Thumbnail Control. 2016/03/31
  A. Refer to the ShowThumbImage event's MaxImage parameter.  
3 Q. I want to pass image memory handle to TPicture or to TBitmap. Can I do that? 2016/03/31
  A. Yes, there are several ways to do this.
[ImageKit9 VCL <--> TPicture]
Use the ImageKit control's Picture property.

[ImageKit9 VCL --> TBitmap]
Use the ImageKit control's or the Common control's BitmapFromDib method.
Use the DLL version's IKBitmapFromDib function.
Use the clipboard.
Pass the data to a format that TBitmap can read.

[ImageKit9 VCL <-- TBitmap]
Use the ImageKit control's or the Common control's DibFromBitmap method.
Use the DLL version's IKDibFromBitmap function.
Use the clipboard.
Pass the data to a format that ImageKit9 VCL can read.
 
2 Q. When I try to run one of the DLL sample programs I get an execution error. Why? 2016/03/31
  A. You need to copy the ImageKit9 DLL files into the same directory as the sample program or into a directory with a valid path. The ImageKit9 DLL files can be found in the "\Product\System" folder under the directory where the ImageKit9 VCL was installed.  
1 Q. Does the ImageKit9 VCL have a Slideshow control? 2016/03/31
  A. No, the ImageKit9 VCL does not have the Slideshow control that was present in earlier versions of the ImageKit.