For example:
[(#TITRE
|image_typo{police=stencil.ttf,couleur=000000,taille=40}
|image_aplatir{gif,ff0000})]</code>
The title transformed into a typographic image is a PNG file with transparent areas. Running this image through the image_aplatir
filter turns it into a GIF, replacing the transparent areas with red (ff0000).
The function accepts as parameters, in order:
- the format (gif, jpg, png, webp),
- the background colour,
- the compression quality (32, 64, or 128 for gif and from 0 to 100 for jpg)
- transparency preservation (0 or 1): when this parameter is 1, the transparency of the gif or webp is preserved and the background color isnt used.
For example:
In a DOCUMENTS loop,
[(#FICHIER|image_aplatir{gif,ffffff,128,1})]
will convert the image to a good quality GIF by forcing the background to be transparent.