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

[Visual Basic]   [ Boolean = ]imagekitcontrolname.Effect.SetSecretImage(Handle1 As LONG_PTR, Handle2 As LONG_PTR, Text As String, FName As String, FSize As Integer, Bold As Boolean, Italic As Boolean, Underline As Boolean, StrikeOut As Boolean, Direction As Integer, Angle As Long, Level As Long, Left As Long, Top As Long, Right As Long, Bottom As Long)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetEffect().SetSecretImage(LONG_PTR Handle1, LONG_PTR Handle2, LPCTSTR Text, LPCTSTR FName, short FSize, BOOL Bold, BOOL Italic, BOOL Underline, BOOL StrikeOut, short Direction, long Angle, long Level, long Left, long Top, long Right, long Bottom)
[VB.NET]   [ Boolean = ]imagekitcontrolname.Effect.SetSecretImage(Handle1 As Integer(x86) or Long(x64), Handle2 As Integer(x86) or Long(x64), Text As String, FName As String, FSize As Short, Bold As Boolean, Italic As Boolean, Underline As Boolean, StrikeOut As Boolean, Direction As Short, Angle As Integer, Level As Integer, Left As Integer, Top As Integer, Right As Integer, Bottom As Integer)
[C#.NET]   [ bool = ]imagekitcontrolname.Effect.SetSecretImage(int(x86) or long(x64) Handle1, int(x86) or long(x64) Handle2, string Text, string FName, short FSize, bool Bold, bool Italic, bool Underline, bool StrikeOut, short Direction, int Angle, int Level, int Left, int Top, int Right, int Bottom)

(x86) refers to the 32 bit version, (x64) refers to the 64 bit version.

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 (the length of text can be up to 127 bytes)
FName Sets the font name (the length of the font name can be up to 31 bytes)
FSize Sets the font size ( in points)
Bold If True (nonzero), sets font to bold
Italic If True (nonzero), sets font to italics
Underline If True (nonzero), sets underline to font.
StrikeOut If True (nonzero), 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)

Return Value

Returns True (nonzero) if successful, otherwise returns False (0).

Explanation

The SetSecretImage method sets a digital watermark 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.

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 successful the resulting raster image handle is set in the  ImageHandle property or the Layer(LayerNo).ImageHandle property dpending on the value set in the LayerNo property. The resulting image is a 24 bit image.

When the Caption, Message, and ButtonName properties are blank, the progress dialog box will not be displayed. When the progress dialog box is displayed, the percentage that the processing has completed will be shown in the dialog box.

To check if a watermark exists on an image, please refer to the CheckSecretImage method.

Differences between ImageKit7/8

The Handle1 and Handle2 arguments have a different type.

The ImageKit10 ActiveX is a product created by Newtone Corporation