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-10-29 05:16:39 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.