Watermark for the second thumbnail.
Syntax
Initialize
JavaScript | ![]() |
---|---|
<script type="text/javascript" src="iuembed.js"></script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500); //...other params... iu.addParam("UploadThumbnail2Watermark", ""); //...other params... iu.writeHtml(); </script> |
Get/Set Value in Runtime
JavaScript | ![]() |
---|---|
getImageUploader("ImageUploaderID").setUploadThumbnail2Watermark(value); value = getImageUploader("ImageUploaderID").getUploadThumbnail2Watermark(); |
Property Value
A string value that specifies watermark settings for the second thumbnail. Watermark string syntax is described in the Remarks section.
If empty string is specified, watermark will not be drawn on this thumbnail.
Default value is "".
Remarks
The watermark string consists of several variables separated with a semicolon. The following variables are supported:
Variable | Description | ||
---|---|---|---|
Text |
Watermark text. It should be enclosed in single quotation marks (
Default value is an empty string. |
||
Font |
Font name. This font should be installed on the client machine. That's why it is highly recommended to use some generic font like
Default value is |
||
ImageUrl |
Url to an image that will be used as the watermark. If a non-empty value is specified, Default value is an empty string. When the image watermark is specified, the following parameter also make sense:
|
||
ImageWidth |
Width of the image that will be used as the watermark. Makes sense only if the 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. |
||
ImageHeight |
Height of the image that will be used as the watermark. Makes sense only if the 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. |
||
Position |
Watermark position. It can take one of the following values:
Default value is |
||
Size |
Font size (in pixels).
Default value is |
||
OffsetX |
Horizontal offset (in pixels) of the watermark relatively the position it is anchored to (according to the
Default value is |
||
OffsetY |
Vertical offset (in pixels) of the watermark relatively the position it is anchored to (according to the
Default value is |
||
Style |
Font style. The following styles are supported:
You can specify several styles separated with a comma. Example:
Default value is an empty string (regular font is used). |
||
Opacity |
Watermark opacity percentage. If 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 |
||
Background |
Whether to draw a background under the text.
Default value is |
||
BackgroundColor |
Background color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style
Default value is |
||
BackgroundMarginWidth |
Width of additional space outside of the watermark filled with background (in pixels). Makes sense only if the
Default value is |
||
BackgroundMarginHeight |
Height of additional space outside of the watermark filled with background (in pixels). Makes sense only if the
Default value is |
||
Outline |
Whether to draw outline around the text.
Default value is |
||
OutlineColor |
Text outline color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style
Default value is |
||
OutlineWidth |
Width of the text outline if the
Default value is |
||
Fill |
Whether to draw fill the text.
Default value is |
||
FillColor |
Font color. It has the same syntax as all Image Uploader color properties (i.e. HTML-style
Default value is |
![]() |
---|
The watermark string is case insensitive. |
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 the watermark string which will draw green semi-transparent italic text Aurigma in the bottom left corner of an image:
JavaScript | ![]() |
---|---|
iu.addParam("UploadThumbnail1Watermark", "Text='Aurigma';Opacity=75;FillColor=#00ff00;Position=BottomLeft;Style=Italic;Size=30"); |
For image watermarks ImageUrl
, ImageWidth
, and ImageHeight
are required. Here is an example of semi-transparent
logo drawn in the top tight corner of the image:
JavaScript | ![]() |
---|---|
iu.addParam("UploadThumbnail1Watermark", "ImageUrl=http://localhost/AurigmaLogo.png;ImageWidth=86;ImageHeight=63;" + "Position=TopRight;Opacity=50"); |
See Also
Examples
Adding WatermarksReference
UploadThumbnail2BackgroundColor PropertyUploadThumbnail2CompressOversizedOnly Property
UploadThumbnail2CompressionMode Property
UploadThumbnail2CopyExif Property
UploadThumbnail2CopyIptc Property
UploadThumbnail2FitMode Property
UploadThumbnail2Height Property
UploadThumbnail2JpegQuality Property
UploadThumbnail2ResizeQuality Property
UploadThumbnail2Width Property
UploadThumbnail1Watermark Property
UploadThumbnail3Watermark Property
UploadThumbnailWatermark Property