barnebys / bimp-php
Barnebys Image Processor PHP Client
0.0.6
2018-10-01 08:56 UTC
Requires (Dev)
- phpunit/phpunit: ^5.7
README
Barnebys Image Processor
This is an helper for PHP to build image URL for Barnebys Image Processor with ease.
Resize image
// Create the URL Builder with your bimp domain & secret
$urlBuilder = new UrlBuilder('bimp.yourdomain.com', 'test');
$urlBuilder->setWidth(200);
// Get the signed image URL
$url = $urlBuilder->createURL();
Crop image
$urlBuilder = new UrlBuilder('bimp.yourdomain.com', 'test');
$urlBuilder->setSize(200,200);
Crop image and set gravity
$urlBuilder = new UrlBuilder('bimp.yourdomain.com', 'test');
$urlBuilder
->setSize(200,200)
->setCrop('north');
See Barnebys Image Processor for documentation for available crop gravities & strategies.