Zoom
zoom
You can specify the amount you want to zoom in / out of a picture or a part of it.
Parameters
The parameter is given in a %, where 1000 is a 1:1 ratio, while the value bigger than 1000 means closing (zooming) in, the one smaller then 1000 is zooming out.
- min 1
- max 10000
Limitations
- This transformation does not have any limitations.
Dependencies
gravity
: if gravity is specified, than the zooming measures should be considered in relation to the center of the gravity field.
Examples
See the following examples about the possible ways of usage.
Keeping the original image’s width at 500 px while zooming at the face by 50%
w:500/g:face_z:500
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(500)->group()->gFace()->zoom(500);
Keeping the original image’s width at 500 px while zooming at the face by 100%
w:500/g:face_z:1000
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(500)->group()->gFace()->zoom(1000);
Keeping the original image’s width at 500 px while zooming at the face by 150%
w:500/g:face_z:1500
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(500)->group()->gFace()->zoom(1500);