Download the PHP package mrcnpdlk/image-web-tool without Composer
On this page you can find all versions of the php package mrcnpdlk/image-web-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package image-web-tool
Image web tool
Simple image web tool manipulation package - other than all.
Instalation
The best way is cloning the repo with specific branch name. Stable releases are sown here.
Configuration
In folder config copy file config.json.dist
and rename to config.json
.
Edit file and set or delete options:
storage
- path to the folder with picturesfont
- path to the ttf file with font. Used as font on placeholders files.debug
- if TRUE no placeholder, but exception stack is shown.
Default font BlowBrush is included to the project.
Caching
For better performance for each request cache is used. REDIS if enabled. If not FILES is used.
Request url schema
Example
params
and fileName
are passed to the api.php file.
Request Options (params
)
Option | Description | Values | Notes |
---|---|---|---|
w | width | value in px | |
h | height | value in px | |
c | crop mode | enum: scale,fit,fit-margin,fill | |
q | quality | 0-100 | only JPG format supported |
r | rotate | angle in degrees | |
bgc | background color | HEX format | |
e | effect | enum: g (gamma), n (negative), gr (grayscale), c (colorize), b (blur) | |
eo | effect option | string,int - depends on effect type, see table below |
Effect [e] | Description | Option [eo] | Default |
---|---|---|---|
g | gamma | gamma correcion | 1 |
n | negative | ||
gr | grayscale | ||
c | colorize | color in HEX format | #FFFFFF |
b | blur | sigma | 1 |
Nginx Configuration
Examples
/h_100/demo.jpg
Height is set. Default FIT crop mode is enabled.
/h_200,e_b,eo_5/demo.jpg
Blur effect.
/h_200,e_b,eo_5/demo.jpg
Colorization effect with pink color.
/h_200,e_n/demo.jpg
Negative effect.
/h_200,q_2/demo.jpg
Less quality.
/h_200,w_200,c_fill/demo.jpg
FILL mode.
/h_200,w_200,c_fit/demo.jpg
FIT mode.
/h_200,w_200,c_fit-margin/demo.jpg
FIT MARGIN mode.
/h_200,w_200,r_20/demo.jpg
ROTATE mode.
/w_200,h_100/demo.jpg
File not found. Placeholder is shown.
/w_200,h_100/demo.jpg
Placeholder is shown.
All versions of image-web-tool with dependencies
php Version >=7.0
ext-imagick Version *
mrcnpdlk/pfc-adapter Version ~0.1.0
slim/slim Version ~3.9.2
imagine/imagine Version ~0.7.1
hassankhan/config Version ~0.11.2