Download the PHP package allovince/evathumber without Composer
On this page you can find all versions of the php package allovince/evathumber. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download allovince/evathumber
More information about allovince/evathumber
Files in allovince/evathumber
Package evathumber
Short Description EvaThumber, A light-weight url based image transformation php library
License BSD-3-Clause
Homepage http://avnpc.com/pages/evathumber
Informations about the package evathumber
EvaThumber : 基于URL的图片处理库 (可实现缩略图 | 二维码 | 水印 | 面部识别等,基于PHP
EvaThumber 是一个基于URL的轻量级图片处理库,支持缩放/旋转/截取/滤镜等多种常用图片处理,支持设置水印/二维码,并且可以进行面部识别以及PNG优化压缩,所有处理仅仅需要通过更改图片的URL。
EvaThumber基于PHP实现,可以一键安装在任何主流系统,由于基于URL实现接口,所以其他编程语言也可以使用EvaThumber作为前端组件。
EvaThumber is a url based image transformation php library. See English version document.
EvaThumber的源代码存放于Github,完全开源,欢迎Fork或关注我。
下面是几个实例:
原图:
EvaThumber的处理:裁剪为宽100,高100,加黑白滤镜,输出为png格式
按宽度缩小到150px,旋转180度,加上水印,压缩质量为60%。
http://evathumber.avnpc.com/thumb/watermark2/demo,p_50.jpg html
php 'thumbers' => array( 'default' => array( 'source_path' => '/usr/www/upload', 'prefix' => 'thumb', ), 'another' => array( 'source_path' => '/usr/www/another', ), ),
http://evathumber.avnpc.com/thumb/default/abc/demo,c_fill,w_100,h_100.gif
http://evathumber.avnpc.com/thumb/another/foo.png php 'thumbers' => array( 'max' => array( 'max_width' => 100, 'max_height' => 100, ), ),
http://evathumber.avnpc.com/thumb/max/demo.jpg
http://evathumber.avnpc.com/thumb/d/demo,w_100.gif http://evathumber.avnpc.com/thumb/d/demo,w_100.xbm
http://evathumber.avnpc.com/thumb/d/demo,w_100.jpg
http://evathumber.avnpc.com/thumb/d/demo,h_50.jpg
http://evathumber.avnpc.com/thumb/d/demo,p_30.jpg php 'thumbers' => array( 'stretch' => array( 'allow_stretch' => true, ), ),
http://evathumber.avnpc.com/thumb/stretch/demo,w_310.jpg
http://evathumber.avnpc.com/thumb/d/demo,c_50.jpg
http://evathumber.avnpc.com/thumb/d/demo,c_50,g_30.jpg
http://EvaThumber.avnpc.com/thumb/demo,c_100,g_200,x_80,y_10.jpg
http://evathumber.avnpc.com/thumb/d/demo,c_50,g_60,x_40,y_30,w_30.jpg
http://evathumber.avnpc.com/thumb/d/demo,c_fill,w_50,h_50.jpg
http://evathumber.avnpc.com/thumb/d/demo,r_90,w_50.png
http://evathumber.avnpc.com/thumb/d/demo,w_100,q_10.jpg php 'thumbers' => array( 'd' => array( 'quality' => 70, ), ), php 'thumbers' => array( 'd' => array( 'watermark' => array( 'enable' => 1, 'position' => 'br', 'layer_file' => DIR . '/layers/watermark.png', ), ), ), php 'thumbers' => array( 'd' => array( 'watermark' => array( 'enable' => 1, 'position' => 'br', 'layer_file' => '', 'text' => 'EvaThumber', 'font_file' => DIR . '/layers/Yahei_Mono.ttf', 'font_size' => 12, 'font_color' => '#FFFFFF', ), ), ), php 'thumbers' => array( 'd' => array( 'watermark' => array( 'enable' => 1, 'position' => 'center', 'layer_file' => '', 'text' => 'http://avnpc.com/pages/evathumber', 'qr_code' => 1, 'qr_code_size' => 2, 'qr_code_margin' => 1, ), ), ),
http://evathumber.avnpc.com/thumb/d/foo,c_fill,d_picasa,h_100,w_100.jpg http://evathumber.avnpc.com/thumb/d/bar,c_fill,d_flickr,h_100,w_100.jpg php 'thumbers' => array( 'zip' => array( 'source_path' => DIR . '/upload/archive.zip', 'zip_file_encoding' => 'GB2312', ), ),
- archive.zip
- archive/ zipimage.jpg 中文.jpg
http://evathumber.avnpc.com/thumb/zip/archive/zipimage,w_100.jpg
http://evathumber.avnpc.com/thumb/zip/archive/中文,w_100.jpg
http://evathumber.avnpc.com/thumb/d/face,w_100.jpg
http://evathumber.avnpc.com/thumb/d/face,c_100.jpg
http://evathumber.avnpc.com/thumb/d/face,c_face,w_100,h_100.jpg php 'thumbers' => array( 'png' => array( 'png_optimize' => array( 'enable' => 1, 'pngout' => array( 'bin' => DIR . '/bin/pngout.exe', ), ), ), ), php 'thumbers' => array( 'd' => array( 'allow_sizes' => array( '200100', ), ), ), php 'thumbers' => array( 'd' => array( 'disable_operates' => array( 'filter', 'rotate', 'dummy', ), ), ), php 'thumbers' => array( 'd' => array( 'max_width' => 300, 'max_height' => 300, 'allow_sizes' => array( '200200', '100100', '5050', ), 'disable_operates' => array( 'dummy', 'filter', 'gravity', 'percent', 'quality', 'rotate', 'x', 'extension', ), ), ),
cd /opt/htdocs git clone git://github.com/AlloVince/EvaThumber.git cd EvaThumber composer install
composer install
cd d:\xampp\php php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
@ECHO OFF SET composerScript=composer.phar php "%~dp0%composerScript%" %*
composer -V
apt-get install curl cd /usr/local/bin curl -s http://getcomposer.org/installer | php chmod a+x composer.phar alias composer='/usr/local/bin/composer.phar'
server { listen 80; server_name evathumber.avnpc.com; location / { root /usr/www/EvaThumber/; index index.php index.html index.htm; if (!-e $request_filename){ rewrite ^/(.*)$ /index.php last; } } location ~ .php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/www/EvaThumber/$fastcgi_script_name; } } php 'thumbers' => array( 'd' => array( 'thumb_cache_path' => '/usr/www/EvaThumber/thumb', 'cache' => 1, ), ),
http://evathumber.avnpc.com/index.php/thumb/d/demo,w_100.jpg
http://evathumber.avnpc.com/thumb/d/demo,w_100.jpg
composer install --dev
composer update --dev php 'thumbers' => array( 'd' => array( 'face_detect' => array( 'enable' => 0, 'draw_border' => 1, 'cascade' => '', 'bin' => DIR . '/bin/opencv.py', ), ), ),
wget http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz tar -xvf pngout-20130221-linux.tar.gz
./pngout -h
如果有输出则支持当前CPU
## 其他
### 寻求帮助
如果有任何问题,请移步至[EvaThumber的Issues页面](https://github.com/AlloVince/EvaThumber/issues)提交BUG
### 贡献代码
也欢迎对EvaThumber发起Pull Request,你可以首先[Fork EvaThumber](https://github.com/AlloVince/EvaThumber/fork)。
## 相关技术
EvaThumber基于以下技术实现:
- [Imagine](https://github.com/avalanche123/Imagine) : 统一接口的图片处理库。基础功能依赖
- [Requests](https://github.com/rmccue/Requests) : 轻量级HTTP Client,无需cURL支持。扩张功能`自动素材`依赖
- [PHPQRCode](https://github.com/aferrandini/PHPQRCode) : 生成QR码的PHP库。扩展功能`二维码水印`依赖
- [PNGOUT](http://advsys.net/ken/utils.htm) : PNG图片优化压缩工具
- [Symfony Process Component](http://symfony.com/doc/current/components/process.html) : 轻巧的系统命令行调用
- [OpenCV](http://opencv.org/) : 计算机视觉识别库,`面部识别`依赖
- [Cloudinary](http://cloudinary.com/) : 参考了Cloudinary的API设计;
## 许可证
EvaThumber 是 [EvaEngine](https://github.com/AlloVince/eva-engine)项目的一个前端组件,基于[New BSD License](http://framework.zend.com/license/new-bsd)发布,简单说,你可以将EvaThumber用与任何商业或非商业项目中,可以自由更改EvaThumber的源代码,惟一做的是保留源代码中的作者信息。
## 感谢
实例图片来自 [Рыбачка](http://nzakonova.35photo.ru/photo_391467/)
## 旧版本
EvaThumber由[EvaCloudImage](http://avnpc.com/pages/evacloudimage)更名而来,基本兼容旧版的API并作了完全的重构。旧版本代码[在此](https://github.com/AlloVince/EvaThumber/tree/42941a86af2b5fe92a5a3376010cfad607cce555)
![](https://avnpc.com/static/images/telegram.png)
[Join My Telegram Group](https://t.me/joinchat/HKvcQAw2kqASoYfxiSrIbA)