barnebys/bimp-php

Barnebys Image Processor PHP Client

0.0.6 2018-10-01 08:56 UTC

This package is auto-updated.

Last update: 2024-04-29 03:44:53 UTC


README

Latest Stable Version Build Status Coverage Status

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.