This function sets a digital watermark image or digital watermark text into a raster image.

[C++Builder]   HANDLE IKSetSecretImage(HANDLE Handle1, HANDLE Handle2, LPCTSTR Text, LPCTSTR FName, WORD FSize, BOOL Bold, BOOL Italic, BOOL Underline, BOOL StrikeOut, BYTE Direction, int Angle, int Level, int Left, int Top, int Right, int Bottom, IKPROCESSPROC UserProc, LPCTSTR Caption, LPCTSTR Message, LPCTSTR Button);
[Delphi]   function IKSetSecretImage(Handle1, Handle2: THandle; Text, FName: PChar; FSize: Word; Bold, Italic, Underline, StrikeOut: LongBool; Direction: Byte; Angle, Level, Left, Top, Right, Bottom: Integer; UserProc: LONG_PTR; Caption, Message, Button: PChar): THandle;

Parameters

Name Explanation
Handle1 The image handle of the original image. (24 bit color images only). The watermark will be set on this image.
Handle2 The image handle of the digital watermark (1 bit color image).
Text Sets the digital watermark text (In the ANSI version, the length of text can be up to 127 bytes. In the Unicode version, the lenght of text can be up to 127 characters).
FName Sets the font name (In the ANSI version, the length of the font name can be up to 31 bytes.In the Unicode version, the lenght of text can be up to 31 characters ).
FSize Sets the font size ( in points)
Bold If True, sets font to bold.
Italic If True, sets font to italics.
Underline If True, sets underline to font.
StrikeOut If True, sets strikethrough line to font.
Direction Sets the direction of the watermark text (0: left to right, 1: right to left, 2: top to bottom, 3: bottom to top)
Angle Sets the rotation angle of the watermark text (0, 90, 180, 270 degrees).
Level Sets the level of "detection" for the watermark (-20 to 20).
Left The x coordinate of the location where the top left corner of the Handle2 image or text is to be attached to Handle1 (in pixels)
Top The y coordinate of the location where the top left corner of the Handle2 image or text is to be attached to Handle1 (in pixels)
Right The x coordinate of the location where the bottom right corner of the text is to be attached to Handle1 (in pixels)
Bottom The y coordinate of the location where the bottom right corner of the text is to be attached to Handle1 (in pixels)
UserProc The address of the user function (If not using the user function then set to 0)
Caption Sets the text displayed in the title bar of the progress dialog box
Message Sets the message displayed in the progress dialog box
Button Sets the name of the button displayed in the progress dialog box

Return Value

Returns the raster image handle (24 bit image) if successful. Returns 0 if unsuccessful.

Explanation

The IKSetSecretImage function sets a digital watermark image or digital watermark text into a raster image. It can set either a 1 bit color image or text as the watermark. The value of the Level parameter determines how "detectable" the digitable watermark will be. As the Level parameter increases in a positive direction, the digital watermark becomes brighter. As it increases in a negative direction, the digital watermark becomes darker. Note also that depending on the Direction or Angle parameter values, the Underline and StrikeOut parameters may be ineffective. Left, Top, Right, and Bottom parameters are in pixel units.

If the Handle2 parameter is set (nonzero), the image referred to by the Handle2 parameter will be set as the digital watermark. In this case the top left corner of the Handle2 image will be attached to the Handle1 image at the coordinate location determined by the Top and Left parameters. If the Handle2 parameter is 0, then the Text set in the Text parameter will be used as the digital watermark. It will be placed within a rectangular area on the Handle1 image as determined by the Top, Left, Bottom and Right parameters. If you wish to set text longer that 128 bytes or if you want to place watermarks in multiple locations, please do that by creating the appropriate image for Handle2.

Note: the image handles passed to this function are NOT automatically freed after execution.

If the user function is set or if the Caption, Message, and Button parameters are blank then the Progress dialog box is not displayed. If the Progress dialog box is displayed, it indicates the percentage of the current process completed. For more information about the user function please refer to the Definition of User Function in the Ik10Effect.dll, Ik10EffectA.dll, Ik10Effect64.dll, Ik10Effect64A.dlll section.

 

The ImageKit10 VCL is a product created by Newtone Corporation