To use this ASP component move the DLL into a subdirectory (like \winnt\system32 for NT or \windows\system for Win95). To register the component on the system change to the directory where you installed the DLL and type:
regsvr32 AiSWatermark.dll
| Property | Type | Description |
| FontName | string | specified the name of the font.
Example:
Watermark.FontName = "MS Sans Serif"
|
| FontSize | integer | the size of the font.
Example:
Watermark.FontSize = 12
|
| FontColor | integer | the color of the font.
Example:
Watermark.FontColor = &hFF00ee
Watermark.FontColor = RGB(&hE2, &hBB, &hF3)
Watermark.FontColor = vbRed
|
| FontStyle | integer | the style of the font.
Example:
Watermark.FontStyle = CI_fsItalic + CI_fsBold
Allowed values:
fsBold = 1
fsItalic = 2
fsUnderline = 4
fsStrikeOut = 8
or
CI_fsBold = 1
CI_fsItalic = 2
CI_fsUnderline = 4
CI_fsStrikeOut = 8
|
| FontCharset | integer | Charset of used text watermark font |
| TextLineSpace | integer | the space between two lines of text watermark. |
| WatermarkImageFile | string | the filename of image watermark (used only for Type=CI_TYPE_IMAGE=2) |
| BorderStyle | integer | Style of the border
Allowed values:
CI_BORDERSTYLE_NONE = 1
CI_BORDERSTYLE_LINE = 2
or
bsNone = 1
bsLine = 2
|
| BorderColor | integer | Color of the border |
| BorderWidth | integer | Width of the border in pixels |
| BorderBottom | integer | Bottom border of image without watermarks |
| BorderTop | integer | Top border of image without watermarks |
| BorderRight | integer | Right border of image without watermarks |
| BorderLeft | integer | Left border of image without watermarks |
| HorizontalSpace | integer | Horizontal space between string (only for Style=CI_STYLE_TILE) |
| VerticalSpace | integer | Vertical space between string (only for Style=CI_STYLE_TILE) |
| JPEGQuality | integer | Quality of JPEQ images 0..99 |
| Position | integer | the positions of watermark (only for Style=CI_STYLE_POSITION)
Example:
Watermark.Position = CI_POSITION_BOTTOM_RIGHT + CI_POSITION_TOP_LEFT
Allowed values:
wpTopLeft = 1
wpTopCenter = 2
wpTopRight = 4
wpCenterLeft = 8
wpCenter = 16
wpCenterRight = 32
wpBottomLeft = 64
wpBottomCenter = 128
wpBottomRight = 256
or
CI_POSITION_TOP_LEFT = 1
CI_POSITION_TOP_CENTER = 2
CI_POSITION_TOP_RIGHT = 4
CI_POSITION_CENTER_LEFT = 8
CI_POSITION_CENTER = 16
CI_POSITION_CENTER_RIGHT = 32
CI_POSITION_BOTTOM_LEFT = 64
CI_POSITION_BOTTOM_CENTER = 128
CI_POSITION_BOTTOM_RIGHT = 256
|
| Style | integer | style of watermark position (tile or specified positions).
Example:
Watermark.Style = CI_STYLE_POSITION
Allowed values:
wsFixed =1
wsTile =2
or
CI_STYLE_POSITION =1
CI_STYLE_TILE =2
|
| Transparency | integer | Transparency of watermark level (0..255, 0 - non transparent, 255- full transparent) |
| WatermarkTransparentColor | integer | Transparent color of watermark image.
Example:
Watermark.WatermarkTransparentColor = &hFF00ee
Watermark.WatermarkTransparentColor = RGB(&hE2, &hBB, &hF3)
Watermark.WatermarkTransparentColor = vbWhite
|
| WatermarkUseTransparent | bool | Use or not transparent color for merge watermark image with source image |
| WatermarkType | integer | the type of watermark (image of text).
Example: Watermark.Type = CI_TYPE_TEXT
Allowed values:
wtText =1
wtImage =2
or
CI_TYPE_TEXT =1
CI_TYPE_IMAGE =2
|
| Error | string | the description of error |
| Text | string | the text of watermark. You can use macros for customize your text.
Example:%file% (W:%width%; H:%height%) %sizeK%Kb
Result watermark: c:\image1.jpg (W:300; H:200) 34Kb
Note! If you want to add percent "%" character to your watermark text, you must write two character "%%".
|
| TextAlignment | integer | Text alignment
Example: Watermark.TextAlignment = CI_ALIGNMENT_CENTER
Allowed values:
taCenter =0
taLeft =1
taRigt =2
taWidth =3
or
CI_ALIGNMENT_CENTER =0
CI_ALIGNMENT_LEFT =1
CI_ALIGNMENT_RIGHT =2
CI_ALIGNMENT_WIDTH =3
|
| TextAngle | integer | Angle for rotation watermark text (0..360°) |
| Stretch | bool | Allow stretch watermark |
| StretchProportional | bool | Save proportion of stretched watermark (only for image watermarks) |
| StretchPercent | integer | Percent of stretching |
| SaveOriginalDate | bool | Save date and time of original image file |
| SaveEXIF | bool | Save EXIF info from original image in the protected image |
| SaveIPTC | bool | Save IPTC info from original image in the protected image |
| BackgroundColor | integer | Transparent color for watermark |
| TextBackgroundColor | integer | the color of background of text watermark
Example:
Watermark.TextBackgroundColor = &hFF00ee
Watermark.TextBackgroundColor = RGB(&hE2, &hBB, &hF3)
Watermark.TextBackgroundColor = vbWhite
|
| MaskType | integer | Mask for adding watermark into original image. Allowed values:
mtSolid = 1
mtRandom = 2
mtVertLines = 4
mtHorizLines = 8
mtCross= 16
mtDownDiagonal = 32
mtUpDiagonal = 64
mtCrossDiagonal = 128
mtSquare = 256
or
CI_MASKTYPE_Solid = 1
CI_MASKTYPE_Random = 2
CI_MASKTYPE_VertLines = 4
CI_MASKTYPE_HorizLines = 8
CI_MASKTYPE_Cross= 16
CI_MASKTYPE_DownDiagonal = 32
CI_MASKTYPE_UpDiagonal = 64
CI_MASKTYPE_CrossDiagonal = 128
CI_MASKTYPE_Square = 256
|
| MaskRandomFill | integer | density of filling random mask (0..100). Used only if MaskType=CI_MASKTYPE_Random |
| MaskLineThick | integer | width of lines mask. Used only if MaskType>CI_MASKTYPE_Random |
| MaskStep | integer | space between lines of mask. Used only if MaskType>CI_MASKTYPE_Random |
| Emboss | bool | Embossed style of watermark |
| Method | Parameters | Result | Description |
| LoadSettings | FileName Section | N/A | Load watermark settings from file. Parameter Section is optional, default section name is "Watermark Settings". |
| SaveSettings | FileName Section | N/A | Save watermark settings to file. Parameter Section is optional, default section name is "Watermark Settings". |
| Prepare | N/A | N/A | Prepare for call MergeWatermak (used once before protect multitude images) |
| MergeWatermark | SourceImageFileName TargetImageFileName | N/A | Place watermark to image and save new image |
| MakeThumbnail | SourceFileName ThumbnailFileName Width Height | N/A | Make thumbnail from SourceFileName image and save it to the ThumbnailFileName. Width and Height are maximum size of thumbnail image. |
| OpenImage | FileName | N/A | Open image from file FileName |
| ReopenImage | N/A | N/A | Reopen last image |
| ProtectImage | N/A | N/A | Protect current image by use current settings |
| SaveImage | FileName | N/A | Save image with specified image file name |
| SaveThumbnail | FileName width height | N/A | Make and save thumbnail of the opened image. Note! Call SaveThumbnail before first call of ProtectImage if you want to receive thumbnail without watermark. |
| CloseImage | N/A | N/A | Close open image and clear all used buffers |
| LoadUserMacros | FileName | N/A | Load user defined macros from the file |
| SaveUserMacros | FileName | N/A | Save all user defined macros in the file |
| SetMacros | MacroName Value | N/A | Set Value as value of macros MacroName. Example:
call SetMacros("%c%, "©")
|
| GetMacros | MacroName | string | return value of macros MacroName. Example:
text= wm.GetMacros("file")
result of the command will be full image file name with full path.
|
| ParseText | Text | string | return parsed string. Example:
text= wm.ParseText("Copyright %c% 2000-%year% Watermarker.com")
result of the text will be "Copyright © 2000-2003 Watermarker.com"
see list of all macros
|