2017 © Pedro Peláez
 

library imagizer-php

The official PHP Client for the Imagizer Media Engine

image

nventify/imagizer-php

The official PHP Client for the Imagizer Media Engine

  • Monday, October 10, 2016
  • by nibty
  • Repository
  • 1 Watchers
  • 2 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

ImagizerPHP

The official PHP Client for the Imagizer Media Engine, (*1)

The Imagizer Media Engine accelerates media delivery to your mobile Apps or Webpages by dynamically rescaling, cropping, and compressing images in real time. See all Imagizer features in our Doc., (*2)

Installation

Using Composer

Define the following requirement in your composer.json file, (*3)

{
    "require": {
        "nventify/imagizer-php": "0.1.*"
    }
}

Then include the auto loading path in your application, (*4)

require __DIR__ . '/vendor/autoload.php';

Basic Usage

Using the free to test Imagizer Demo Service, (*5)

// Initialize the Imagizer Client
$imagizerClient = new Imagizer\Client();

// Since we are using Imagizer Engine Demo Service
// we'll need to specify our Image storage origin
// Imagizer will fetch your images from this endpoint
$imagizerClient->setOriginImageHost("example.com");

// Build a URL with resize and cropping params
// http://example.com/image.jpg?width=400&height=400&crop=fit&dpr=2&hostname=example.com
$imageUrl1 = $imagizerClient->buildUrl("image.jpg", [
    "width" => 400,
    "height" => 500,
    "crop" => "fit"
]);

// Build url with compression
// http://example.com/image.jpg?quality=55&hostname=example.com
$imageUrl2 = $imagizerClient->buildUrl("image.jpg", [
    "quality" => 55
]);

Using your own Imagizer Instance, (*6)

// Initialize the Imagizer Client
$imagizerClient = new Imagizer\Client("your-imagizer-instance.example.com");

// Build a URL with resize and cropping params
// http://your-imagizer-instance.example.com/image.jpg?width=400&height=400&crop=fit&dpr=2
$imageUrl1 = $imagizerClient->buildUrl("image.jpg", [
    "width" => 400,
    "height" => 500,
    "crop" => "fit"
]);

// Build url with compression
// http://your-imagizer-instance.example.com/image.jpg?quality=55
$imageUrl2 = $imagizerClient->buildUrl("image.jpg", [
    "quality" => 55
]);

The Versions

10/10 2016

dev-master

9999999-dev

The official PHP Client for the Imagizer Media Engine

  Sources   Download

Apache-2.0

The Requires

  • php >=5.5.9

 

The Development Requires

by Nicholas Pettas

20/09 2016

v0.1.0

0.1.0.0

The official PHP Client for the Imagizer Media Engine

  Sources   Download

Apache-2.0

The Requires

  • php >=5.5.9

 

The Development Requires

by Nicholas Pettas