2017 © Pedro Peláez
 

library random-grab-bag

A random grab bag of utility classes that have no fixed abode yet.

image

deanblackborough/random-grab-bag

A random grab bag of utility classes that have no fixed abode yet.

  • Tuesday, January 2, 2018
  • by deanblackborough
  • Repository
  • 1 Watchers
  • 1 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Latest Stable Version License Minimum PHP Version, (*1)

Random grab bag

Catch all library for utility classes., (*2)

Description

A random grab bag of utility classes that have no fixed abode yet., (*3)

Installation

The easiest way to use any of these classes is via composer. composer require deanblackborough/random-grab-bag, alternatively include the classes in src/ in your library., (*4)

The classes

Image Resize

You can use the resize class via the API or directly if you want or need a little more control over the output and options., (*5)

API

$resizer = new DBlackborough\GrabBag\ImageResize($format);

$resizer->resizeTo(
        $width, 
        $height, 
        $maintain_aspect = true, 
        $canvas_color = [ 'r' => 0, 'g' => 0, 'b' => 0]
    )
    ->source($source_file, $source_path = '')
    ->target($target_file, $target_path = '');

Direct

$resizer = new DBlackborough\GrabBag\ImageResize\Jpeg();

$resizer->setOptions(
        $width, 
        $height, 
        $maintain_aspect = true, 
        $canvas_color = [ 'r' => 0, 'g' => 0, 'b' => 0]
    )
    ->loadImage($source_file, $source_path = '')
    ->resizeSource()
    ->createCopy()
    ->save();

Public methods

I've listed the methods, their params and the return type. If it isn't obvious what a method does I have done a bad job of naming it, if so, please let me know., (*6)

  • createCopy() : AbstractResize
  • getInfo() : array
  • loadImage(string $file, string $path = '') : AbstractResize
  • resizeSource() : AbstractResize
  • save() : AbstractResize
  • setCanvasColor(array $canvas_color) : AbstractResize
  • setFileName(string $filename) : AbstractResize
  • setHeight(int $height) : AbstractResize
  • setOptions(int $width, int $height, int $quality, bool $maintain_aspect = true, array $canvas_color = array('r' => 255, 'g' => 255, 'b' => 255)) : AbstractResize
  • setPath($path) : AbstractResize
  • setWidth(int $width) : AbstractResize

The Versions

02/01 2018

dev-excel-parser

dev-excel-parser http://www.transmute-coffee.com

A random grab bag of utility classes that have no fixed abode yet.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dean Blackborough

image-resize image-crop excel-parser excel-crawler

10/12 2017

dev-master

9999999-dev http://www.transmute-coffee.com

A random grab bag of utility classes that have no fixed abode yet.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Dean Blackborough

image-resize image-crop excel-parser

10/12 2017

v0.07

0.07.0.0 http://www.transmute-coffee.com

A random grab bag of utility classes that have no fixed abode yet.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Dean Blackborough

image-resize image-crop excel-parser

10/12 2017

dev-php7

dev-php7 http://www.transmute-coffee.com

A random grab bag of utility classes that have no fixed abode yet.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Dean Blackborough

image-resize image-crop excel-parser

21/06 2017

v0.06

0.06.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

19/06 2017

dev-api

dev-api https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

17/06 2017

v0.05

0.05.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

16/06 2017

v0.04

0.04.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

15/06 2017

v0.03

0.03.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

14/06 2017

v0.02

0.02.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop

13/06 2017

v0.01

0.01.0.0 https://github.com/deanblackborough/random-grab-bag

A random grab bag of classes

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Dean Blackborough

image-resize image-crop