Adding custom watermarks
A watermark marks an image as yours, for example with a logo or a line of text in a corner. The watermark tool of the image editor puts a text on any image. Images to use as watermarks are set up by an administrator; this page shows how, for both image editors.
Add a watermark to an image
- Edit the item, press Edit image and choose the watermark tool (key W).
- Optionally, select a region with the crop tool first. The watermark is placed in the selected region, or in the lower right corner.
- Type the Text, or choose one of the images the site offers. Choose the Color and the Opacity.
- Press Apply, then Save.
The watermark tool puts a text, or one of the images your site configures, on the image.
Offer your own watermark images in Admin 4 (expimageeditor)
- Put the image, best a PNG with transparency, into a design folder of your extension, for example extension/mysite/design/standard/images/watermarks/logo.png.
- List it in expimageeditor.ini [EditorSettings] Watermarks[] as <label>;<design path>. The path is found like any design file.
- Clear the INI cache.
# extension/mysite/settings/expimageeditor.ini.append.php [EditorSettings] Watermarks[]=Logo;images/watermarks/logo.png
An entry without exactly two parts is ignored. Fonts for the watermark text are listed the same way in Fonts[]; three fonts under the SIL Open Font License ship with the editor and can be listed there.
Offer your own watermark images in the classic admin (ezie)
- Put the image into a design/standard/images/watermarks folder of your extension, for example extension/mysite/design/standard/images/watermarks/logo.png.
- Register it in extension/mysite/settings/image.ini.append.php.
- Clear the caches. The watermark is offered in the editor.
[eZIE] watermarks[]=logo.png
ezie accepts only a plain file name that exists in a design/standard/images/watermarks folder. It ships elephpant.png and ez-logo.png.
What can go wrong
- The new image is not offered. The INI cache still holds the old list. Clear it, and check the spelling of the path.
- The watermark has a white box around it. The image has no transparency. Save it as a PNG with a transparent background.
Read more
Contributors
- Ricardo Correia
- Graham Brookins Updated Maintainer
Comments
Add a comment