This method sets a digital watermark image or digital watermark text into a raster image.
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) |
ALeft | 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) |
ATop | 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) |
ARight | The x coordinate of the location where the bottom right corner of the text is to be attached to Handle1 (in pixels) |
ABottom | 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 if successful, otherwise returns False.
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 ATop, ALeft, ABottom and ARight 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.