barnebys / bimp-php
Barnebys Image Processor PHP Client
Installs: 494
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/barnebys/bimp-php
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.