2017 © Pedro Peláez
 

library binary-filter

Easy Liip Imagine server-side image filter for both files and binary data

image

flazzarotto/binary-filter

Easy Liip Imagine server-side image filter for both files and binary data

  • Thursday, December 8, 2016
  • by flazzarotto
  • Repository
  • 1 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

README

This Symfony3 bundle use liip/imagine to allow easy php-side image filter., (*1)

 Set up

  1. Run composer require flazzarotto/binary-filter, (*2)

  2. Modify you AppKernel.php:, (*3)

    $bundles = [
     // add following lines
     new \Liip\ImagineBundle\LiipImagineBundle(),
     new Flazzarotto\BinaryFilterBundle\BinaryFilterBundle()
    ];
    
  3. Configure your filters the same way you do with liip, but using our binary image loader as data loader. For example:, (*4)

    # config.yml
    liip_imagine :
        # your filter sets are defined here
        filter_sets :
            # use the default cache configuration
            cache : ~
    
            my_filter:
                data_loader: binary_image_data_loader
                filters:
                    thumbnail:
                        size: [1920, 1080]
                        mode: outbound
    

HOW TO USE

The main goal of this package is to allow you to resize, generate thumbnails on the fly, in controllers, commands, services... You can provide both binary data and filepaths to the service., (*5)

Example:, (*6)

$filter = $this->get('image.back_filter'); // the BinaryFilter service

$filter ->setDefaultFilter('my_filter') // filter as defined in your config.yml - optional

        ->loadBinary($data,$outputFile) // $data as binary, $outputFile as path relative to directory - return a BinaryFilter object
        // OR
        ->loadFile($path) // provide absolute path to your input image - return a BinaryFilter object

        ->applyFilter($filter) // you can override default filter - optional if default filter has been given

        ->getMimeType(); // optional; useful to determine extension or for direct download

        ->outputFile(true); // save filtered image to output file; set parameter to true to allow overriding if file exists
        // OR
        ->getFilteredBinary(); // returns picture as binary data

The Versions

08/12 2016

dev-master

9999999-dev

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

08/12 2016

0.1.5

0.1.5.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

07/12 2016

0.1.4

0.1.4.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

07/12 2016

0.1.3

0.1.3.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

07/12 2016

0.1.2

0.1.2.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

07/12 2016

0.1.1

0.1.1.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine

07/12 2016

0.1.0

0.1.0.0

Easy Liip Imagine server-side image filter for both files and binary data

  Sources   Download

GPL-3.0

The Requires

 

by Fabrice Lazzarotto

filter server symfony image resizer binary picture liip_imagine