https://github.com/pmvc-plugin/thumbnail
https://github.com/pmvc-plugin/thumbnail
pmvc-image
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmvc-plugin/thumbnail
- Owner: pmvc-plugin
- Created: 2016-07-10T11:11:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T09:10:03.000Z (about 8 years ago)
- Last Synced: 2025-08-07T09:36:31.746Z (10 months ago)
- Topics: pmvc-image
- Language: PHP
- Homepage:
- Size: 418 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/pmvc-plugin/thumbnail)
[](https://packagist.org/packages/pmvc-plugin/thumbnail)
[](https://travis-ci.org/pmvc-plugin/thumbnail)
[](https://packagist.org/packages/pmvc-plugin/thumbnail)
[](https://packagist.org/packages/pmvc-plugin/thumbnail)
thumbnail
===============

## How to use
* https://github.com/pmvc-plugin/thumbnail/blob/master/demo/demo.php
## Thumb type
* type 0 (New size not equal defined size)
* New image size auto fit by ratio
* Canvans size will same with new image size.
*
* type 1
* New image size auto fit by ratio.
* Canvans will fill with background color, and width and height will same with defined.
*
* type 2
* New image will force to max one between width and height.
* Canvans size same with defined.
* Auot change image location
*
* type 3
* Same with type2 but if image original size smaller than new size, will keep original one.
*
* type 4
* Same with type0 but if original size smaller than new size, will keep original one.
*
* type 5
* For security purpose, do 1:1 change.
* 
## Install with Composer
### 1. Download composer
* mkdir test_folder
* curl -sS https://getcomposer.org/installer | php
### 2. Install by composer.json or use command-line directly
#### 2.1 Install by composer.json
* vim composer.json
```
{
"require": {
"pmvc-plugin/thumbnail": "dev-master"
}
}
```
* php composer.phar install
#### 2.2 Or use composer command-line
* php composer.phar require pmvc-plugin/thumbnail