https://github.com/tck/zf-imageresizer
This Laminas (Zend Framework) module allows image resizing and manipulation by url.
https://github.com/tck/zf-imageresizer
grayscale image image-manipulation image-resize image-resizer manipulation php resize thumbnail zend-framework zf2 zf3
Last synced: about 1 month ago
JSON representation
This Laminas (Zend Framework) module allows image resizing and manipulation by url.
- Host: GitHub
- URL: https://github.com/tck/zf-imageresizer
- Owner: tck
- License: mit
- Created: 2014-06-22T10:54:12.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-06-28T15:59:48.000Z (over 2 years ago)
- Last Synced: 2024-08-08T16:53:32.993Z (over 1 year ago)
- Topics: grayscale, image, image-manipulation, image-resize, image-resizer, manipulation, php, resize, thumbnail, zend-framework, zf2, zf3
- Language: PHP
- Homepage:
- Size: 210 KB
- Stars: 8
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## ImageResizer
[](https://packagist.org/packages/tck/zf2-imageresizer)
[](https://travis-ci.org/tck/zf-imageresizer)
[](https://scrutinizer-ci.com/g/tck/zf2-imageresizer/?branch=master)
[](https://scrutinizer-ci.com/g/tck/zf2-imageresizer/?branch=master)
[](https://packagist.org/packages/tck/zf2-imageresizer)
[](https://packagist.org/packages/tck/zf2-imageresizer)
This Laminas module, once enabled, allows image resizing and manipulation by url.
### Requirements
* PHP 7.2+
* [Laminas MVC](https://docs.laminas.dev/mvc/)
* [Imagine](http://imagine.readthedocs.org/en/latest/)
> **IMPORTANT! Version notes**
> * Version **3.x**: Laminas, dropped support for Zend Framework 3.
> * Version **2.x**: Zend Framework 3, dropped support for Zend Framework 2.
> * Version **1.x**: Zend Framework 2
### Installation
Install via composer in your Laminas project
$ composer require tck/zf2-imageresizer
### Post installation
1. Enabling it in your `application.config.php` file.
```php
]
// ...
'TckImageResizer',
],
// ...
];
```
2. Create "processed" folder in "public" folder.
### Usage
#### Basic Syntax
All files in public folder
* folder/filename.ext
* `processed/`folder/filename`.$command1,param1,param2$command2`.ext
Example: Create a thumbnail and grayscale image
* img/logo.jpg
* `processed/`img/logo`.$thumb,160,120$grayscale`.jpg
#### View helper
Laminas tempalte:
```php
```
Rendered HTML:
```php
```
#### Command list
* thumb(width, height)
* resize(width, height)
* grayscale
* negative
* gamma(correction)
* colorize(hexColor)
* sharpen
* blur(sigma = 1)
* 404(text = 'Not found', backgroundColor = 'F8F8F8', color = '777777', width = null, height = null)
In view helper: ->x404(...)
[text: url-safe base64] - \TckImageResizer\Util\UrlSafeBase64::encode($text)
Own commands possible - example place a watermark (Todo Documentation)
### Goals / Todos
* More commands
* More command options
* Administrative functions
* Create placeholder