teamsisu/contao-greyify

一个contao扩展,通过PHP或inserttag提供将图像转换为灰度的类

安装: 14

依赖: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 0

开放问题: 0

类型:contao模块

0.0.4 2015-02-17 17:32 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:07:20 UTC


README

Version License Downloads

一个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问题跟踪器。