承接 elendev/image-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elendev/image-bundle

Composer 安装命令:

composer require elendev/image-bundle

包简介

Provide simple image utilities for resizing

README 文档

README

Bundle configuration

elendev_image:
    cache_dir: 'path_to_cache_directory'
	source_dir: 'path_to_image_dir'
	cache_url: 'url/to/cache/dir'

The cache_dir configuration key is the local path to the cache directory. It's the directory where the generated files will be stored (for example : /var/www/my-website/media/cache).

The source_dir configuration key is the local path to the directory containing the images (for example : /var/www/my-website/media/original-files).

The cache_url configuration key is the url to the cache directory. If the url http://www.my-website.com redirect to the local /var/www/my-website directory, the value of this configuration key would be http://www.my-website.com/media/cache.

Use Twig's extension image method

<img src="{{image('source')}}"/>

<img src="{{image('source').resize(200, 200)}}"/>

<img src="{{image('source').rotate(180).greyScale()}}"/>

The available methods are those of the Elendev\ElendevImageBundle\ImageProxy class :

interface ImageProxy {

    ...
    
    public function resize($width, $height, $keepRatio = true, $allowEnlarge = false);
    
    /**
     * @param type $degree
     * @param type $bgcolor background color for visible parts, by default black
     */
    public function rotate($degree, $bgcolor = 0);
    
    /**
     * Do greyscale on picture
     */
    public function greyScale();

    ...

}

统计信息

  • 总下载量: 577
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache2
  • 更新时间: 2012-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固