2017 © Pedro Peláez
 

library glideformat

Use the excellent glide api with named presets

image

studiow/glideformat

Use the excellent glide api with named presets

  • Thursday, January 7, 2016
  • by studiowbe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GlideFormat

Use the excellent glide api with named presets, (*1)

Some basic examples

$server = Studiow\GlideFormat\GlideFormatServer::createServer([
            "source" =>  '/path/to/uploads',
            "cache" => '/path/to/cache',
        ]);

$server->addPreset("thumbnail", ["w" => 100, "h" => 150, "fit" => "crop"]);

And when using a router, you could something like this:, (*2)

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

// create $server like above

$router = new \League\Route\RouteCollection();

$router->get("/img/{format}/{filename}", function(Request $request, Response $response, array $args) use ($server) {
     $server->outputImage($args['filename'], $args['format']);
});

The Versions

07/01 2016

dev-master

9999999-dev

Use the excellent glide api with named presets

  Sources   Download

MIT

The Requires

 

The Development Requires

image manipulation gd imagick imagemagick processing editing glide

07/01 2016

v1.0.0

1.0.0.0

Use the excellent glide api with named presets

  Sources   Download

MIT

The Requires

 

The Development Requires

image manipulation gd imagick imagemagick processing editing glide