2017 © Pedro Peláez
 

library image-minify-php-client

PHP Implementation of Image Minify API

image

ingowalther/image-minify-php-client

PHP Implementation of Image Minify API

  • Wednesday, November 11, 2015
  • by ingowalther
  • Repository
  • 1 Watchers
  • 2 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Image Minify PHP Client

Basic PHP-Implementation of Image Minify API, (*1)

see https://github.com/ingowalther/image-minify-api, (*2)

Installation

composer require ingowalther/image-minify-php-client

Usage

$client = new \IngoWalther\ImageMinifyPhpClient\Client\ImageMinifyApiClient($serverUrl, $apiKey);
Parameter Description
$serverUrl The url of your Image Minify API Installation (e.g. http://example.com)
$apiKey Your API-Key

Get compressed image

Returns a "CompressedImage" Object, (*3)

/** @var \IngoWalther\ImageMinifyPhpClient\Response\CompressedImage $compressedImage */
$compressedImage  = $client->getCompressedImage($imagePath);

// The size before compression
$oldSize = $compressedImage->oldSize;

// The size after compression
$newSize = $compressedImage->newSize;

// The saving in percent
$saving = $compressedImage->saving;

// The binary-content of the compressed image
$binaryContent = $compressedImage->binaryContent;

Write compressed image

Compresses the given image and writes the result to the targetpath, (*4)

$success = $client->writeCompressedImage($imagePath, $newImagePath);

The Versions

11/11 2015

dev-master

9999999-dev

PHP Implementation of Image Minify API

  Sources   Download

MIT

The Requires

 

by Ingo Walther

11/11 2015

0.0.4

0.0.4.0

PHP Implementation of Image Minify API

  Sources   Download

MIT

The Requires

 

by Ingo Walther

05/11 2015

0.0.3

0.0.3.0

PHP Implementation of Image Minify API

  Sources   Download

MIT

The Requires

 

by Ingo Walther

05/11 2015

0.0.2

0.0.2.0

PHP Implementation of Image Minify API

  Sources   Download

MIT

The Requires

 

by Ingo Walther

05/11 2015

0.0.1

0.0.1.0

PHP Implementation of Image Minify API

  Sources   Download

MIT

The Requires

 

by Ingo Walther