Download the PHP package jw_301/jw_watermark without Composer
On this page you can find all versions of the php package jw_301/jw_watermark. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jw_301/jw_watermark
More information about jw_301/jw_watermark
Files in jw_301/jw_watermark
Package jw_watermark
Short Description Watermark Extension for TYPO3, adding a ViewHelper that creates watermarks.
License MIT
Homepage https://github.com/jwtue/jw_watermark
Informations about the package jw_watermark
JW Watermark
This extension adds a Fluid ViewHelper that adds a Watermark image on top of an image.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Alternatively, you can install it without composer through the Typo3 extension repository.
Usage
To use the watermark viewhelper, first import the watermark ViewHelper namespace at the beginning of the fluid HTML file like this (add the second line to an existing html tag):
A typical usage then would look like this:
This will create a link to the image with the watermark image on top of it, with the preview (rendered through a partial) remaining unchanged.
The viewhelper can be used like the f:uri.image
ViewHelper documented at https://docs.typo3.org/other/typo3/view-helper-reference/master/en-us/typo3/fluid/latest/Uri/Image.html with all its arguments.
The following additional arguments can be used to add the watermark:
The same as src, treatIdAsReference, image from the f:uri.image
ViewHelper, but for the watermark image.
Opacity value for the watermark image (0=fully transparent, 1=fully opaque)
A color hex code to set a background color of the watermark
Opacity for the background color of the watermark (0=fully transparent, 1=fully opaque)
Horizontal position of the watermark in the image (left/center/right)
Vertical position of the watermark in the image (top/middle/bottom)
Offset from the edge in pixels (horizontally and vertically)
If set, watermarkOffset
is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are width
, height
, long
, short
. They set the dimension that the relative value is based upon (width/height of the image, or the long/short side of the image).
Width of the watermark in pixels
If set, watermarkWidth
is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are width
, height
, long
, short
. They set the dimension that the relative value is based upon (width/height of the image, or the long/short side of the image).
Height of the watermark in pixels
If set, watermarkHeight
is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are width
, height
, long
, short
. They set the dimension that the relative value is based upon (width/height of the image, or the long/short side of the image).
Restrictions
Currently, only PNG watermarks have been tested, but JPG Watermarks may work as well. Support for SVG is unknown.
Also, the ViewHelper will only apply watermarks to JPEG images, not any other image formats.
Issues and feature requests
Please report issues and request features at https://github.com/jwtue/jw_watermark/issues.