-
☆ A M B ☆
- 24,524 Posts
http://www.belafontecode.com/image-manipulation-with-phpthumbof-in-modx-revolution/
[[*tvImage:phpthumbof=`w=120&h=120&zc=1&fltr[]=gray&fltr[]=wmt|Belafonte Code|3|T|FFFFFF||100|20|0||0|`]]
https://github.com/JamesHeinrich/phpThumb/blob/master/docs/phpthumb.readme.txt
"wmt" (WaterMarkText)
[ex: &fltr[]=wmt|<t>|<s>|<a>|<c>|<f>|<o>|<m>|<n>|<b>|<O>|<x>]
where:
<t> is the text to use as a watermark;
URLencoded Unicode HTMLentities must be used for
characters beyond chr(127). For example, the
"eighth note" character (U+266A) is represented
as "♪" and then urlencoded to "%26%239834%3B"
Any instance of metacharacters will be replaced
with their calculated value. Currently supported:
^Fb = source image filesize in bytes
^Fk = source image filesize in kilobytes
^Fm = source image filesize in megabytes
^X = source image width in pixels
^Y = source image height in pixels
^x = thumbnail width in pixels
^y = thumbnail height in pixels
^^ = the character ^
<s> is the font size (1-5 for built-in font, or point
size for TrueType fonts);
<a> is the alignment (one of BR, BL, TR, TL, C, R, L,
T, B, * where B=bottom, T=top, L=left, R=right,
C=centre, *=tile);
note: * does not work for built-in font "wmt"
*or*
an absolute position in pixels (from top-left
corner of canvas to top-left corner of overlay)
in format {xoffset}x{yoffset} (eg: "10x20")
<c> is the hex color of the text;
<f> is the filename of the TTF file (optional, if
omitted a built-in font will be used);
<o> is opacity from 0 (transparent) to 100 (opaque)
(requires PHP v4.3.2, otherwise 100% opaque);
<m> is the edge (and inter-tile) margin in percent;
<n> is the angle
<b> is the hex color of the background;
<O> is background opacity from 0 (transparent) to
100 (opaque)
(requires PHP v4.3.2, otherwise 100% opaque);
<x> is the direction(s) in which the background is
extended (either 'x' or 'y' (or both, but both
will obscure entire image))
Note: works with TTF fonts only, not built-in
-
☆ A M B ☆
- 339 Posts
Susan, thank you again! If i get this correct, I cant align a text to the right side while positioning i.e. 40 pixels from top and 80 from the side, right?
-
☆ A M B ☆
- 24,524 Posts
I have no idea. I just found the documentation.
-
☆ A M B ☆
- 339 Posts
Hi and thank you for your input!
The thing is: you can either say "top right" OR "40px from top and 80px from left".
You can not say "please align the text to the right and place it 40px from top and 80px from the right end of the base image". So if I align names of different sizes to the right side, they either cant be positioned exactly or they run over the end of the image, if its a long name.