Aurigma Image Uploader 7.0.37
converter.thumbnailWatermark Property
Gets or sets a watermark of the thumbnail.
Syntax
JavaScript
Initialize
$au.uploader({
converters : [
{
//...other params...
thumbnailWatermark: "",
//...other params...
}
]
})
Get/Set Value at Runtime
$au.uploader('uploaderID').converters().get(index).thumbnailWatermark(value);
value = $au.uploader('uploaderID').converters().get(index).thumbnailWatermark();
Property Value
Type: String
The watermark of the thumbnail. Watermark string syntax is described in the Remarks section.
If an empty string is specified, watermark will not be drawn on the thumbnail.
Default value is "".
Remarks
The watermark string consists of several variables separated with a semicolon:
variable1=value1;variable2=value2;...
The following variables are supported:
| Variable | Description |
|---|---|
| Text |
Watermark text. If the text contains semicolon or quotation mark characters enclose it in single (' ') or double (" ") quotes. Moreover, quotation marks (both single ' and double ") inside the text should be escaped with a backslash. For example, to get a Andrew's Photos; Vacation text, set this variable as follows: Text="Andrew\'s Photos; Vacation" Default value is an empty string. When the text watermark is specified, the following parameter also makes sense:
|
| FillColor |
Font color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style #rrggbb RGB value). Default value is an empty string (the fill is transparent). |
| Font |
Font name. This font should be installed on the client machine. That is why it is highly recommended to use some generic font like Arial, Verdana, etc. Default value is Arial. |
| Size |
Font size (in pixels). Default value is 12. |
| Style |
Font style. The following styles are supported:
You can specify several styles separated with a comma. Example: Style=Bold,Italic Default value is an empty string (regular font is used). |
| ImageUrl |
Url to an image that will be used as the watermark. Default value is an empty string. When the image watermark is specified, the following parameter also makes sense:
|
| Width |
Width of the image that will be used as the watermark. The image will be resized to the specified dimensions as an ordinary thumbnail, that is, the image can only be downsized, and its proportions are kept. Default value is an empty string (actual image width is used). |
| Height |
Height of the image that will be used as the watermark. The image will be resized to the specified dimensions as an ordinary thumbnail, i.e. the image can only be downsized and its proportions are kept. Default value is an empty string (actual image height is used). |
| Position |
Watermark position. It can take one of the following values:
Default value is BottomRight. |
| OffsetX |
Horizontal offset (in pixels) of the watermark relative to the position it is anchored to (according to the Position variable). Default value is 0 (no offset). |
| OffsetY |
Vertical offset (in pixels) of the watermark relative to the position it is anchored to (according to the Position variable). Default value is 0 (no offset). |
| Opacity |
Watermark opacity percentage. If 0, the watermark is totally transparent. If 100, the watermark is opaque. Values between 0 and 100 will produce watermark with various level of transparency. This value works for all elements of watermark. There is no way to configure different opacity for background, text outline and text fill. Default value is 100. |
| BackgroundColor |
Background color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style #rrggbb RGB value). Default value is an empty string (the background is transparent). |
| BackgroundMarginWidth |
Width of additional space outside of the watermark filled with background (in pixels). Default value is 0. |
| BackgroundMarginHeight |
Height of additional space outside of the watermark filled with background (in pixels). Default value is 0. |
| OutlineColor |
Text outline color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style #rrggbb RGB value). Default value is an empty string (the outline is transparent). |
| OutlineWidth |
Width of the text outline. Default value is 1. |
Though you can set both image and text watermarks at the same time, it makes sense to use only one of them. For text watermarks the only required variable is Text. Here is an example of watermark string which will draw green semi-transparent italic text Aurigma in the bottom left corner of an image:
JavaScript
thumbnailWatermark: 'Text=Aurigma;Opacity=75;FillColor=#00ff00;Position=BottomLeft;Style=Italic;Size=30'
For image watermarks ImageUrl, Width, and Height are required. Here is an example of semi-transparent logo drawn in the top tight corner of the image:
JavaScript
thumbnailWatermark: 'ImageUrl=http://localhost/watermark.png;Width=86;Height=63;Position=TopRight;Opacity=50'
This property makes sense only if the mode property has the Thumbnail value.