teamsisu / contao-greyify
一个contao扩展,通过PHP或inserttag提供将图像转换为灰度的类
0.0.4
2015-02-17 17:32 UTC
Requires
- php: >=5.3
- contao/core: >=3.3,<4.0
This package is not auto-updated.
Last update: 2024-09-28 17:07:20 UTC
README
一个contao扩展,通过PHP或inserttag提供将图像转换为灰度的类
如何使用
inserttag
Default: {{greyify::imagePath/UUID?width=x&height=x&mode=x}} // returns an image tag with figure container SRC: {{greyify::src::imagePath/UUID?width=x&height=x&mode=x}} // returns only the file path TAG: {{greyify::tag::imagePath/UUID?width=x&height=x&mode=x}} // returns an image tag FIGURE: {{greyify::figure::imagePath/UUID?width=x&height=x&mode=x}} // returns an image tag with figure container
php
$image = Greyify::convert(imagePath/UUID?width=x&height=x&mode=x); // returns only the path of the image $image = Greyify::getHTML(imagePath/UUID?width=x&height=x&mode=x); // returns an image tag $image = Greyify::getHTML(imagePath/UUID?width=x&height=x&mode=x, true); // returns an image tag with figure container
对于getHTML方法,第三个参数是"alt"值。对于inserttag和php,width/height/mode参数都是可选的
附加说明
本模块提供“现状”,不提供任何类型的保证。如果发现任何问题,请使用github问题跟踪器。