pmvc-plugin/thumbnail

PMVC Thumbnail Helper

0.2.1 2018-05-27 09:06 UTC

This package is auto-updated.

Last update: 2024-04-12 02:27:02 UTC


README

Latest Stable Version Latest Unstable Version Build Status License Total Downloads

thumbnail

face.jpg

How to use

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.
    • face_new_0.png
  • type 1
    • New image size auto fit by ratio.
    • Canvans will fill with background color, and width and height will same with defined.
    • face_new_1.png
  • type 2
    • New image will force to max one between width and height.
    • Canvans size same with defined.
    • Auot change image location
    • face_new_2.png
  • type 3
    • Same with type2 but if image original size smaller than new size, will keep original one.
    • face_new_3.png
  • type 4
    • Same with type0 but if original size smaller than new size, will keep original one.
    • face_new_4.png
  • type 5
    • For security purpose, do 1:1 change.
    • face_new_5.png

Install with Composer

1. Download composer

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