PHPackages                             deanblackborough/random-grab-bag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. deanblackborough/random-grab-bag

ActiveLibrary

deanblackborough/random-grab-bag
================================

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

v0.07(8y ago)123MITPHPPHP ^7.1

Since Jun 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/deanblackborough/random-grab-bag)[ Packagist](https://packagist.org/packages/deanblackborough/random-grab-bag)[ Docs](http://www.transmute-coffee.com)[ RSS](/packages/deanblackborough-random-grab-bag/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (1)Versions (10)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/46b27cbd9539cce858eb15581bf0944d76f9eef57d31bf1e422fe3cdb5c2f690/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465616e626c61636b626f726f7567682f72616e646f6d2d677261622d6261672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deanblackborough/random-grab-bag)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/deanblackborough/random-grab-bag/blob/master/LICENSE)[![Minimum PHP Version](https://camo.githubusercontent.com/824c5c4ccb56537db3b3b53bb43d7b8edc6286f3b3d1705525e0821dfd22d27e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e737667)](https://php.net/)

Random grab bag
===============

[](#random-grab-bag)

*Catch all library for utility classes.*

Description
-----------

[](#description)

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

Installation
------------

[](#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.

The classes
-----------

[](#the-classes)

### Image Resize

[](#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.

#### API

[](#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

[](#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

[](#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.

- 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' =&gt; 255, 'g' =&gt; 255, 'b' =&gt; 255)) : `AbstractResize`
- setPath($path) : `AbstractResize`
- setWidth(int $width) : `AbstractResize`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~44 days

Total

7

Last Release

3077d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4247123b3cdbe8640fd21f36d98d2244959eb901e43ed5f7c89f8ba954a5eda9?d=identicon)[deanblackborough](/maintainers/deanblackborough)

---

Top Contributors

[![deanblackborough](https://avatars.githubusercontent.com/u/7921914?v=4)](https://github.com/deanblackborough "deanblackborough (37 commits)")

---

Tags

image-cropimage-resizeimage resizeimage-cropexcel-parser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deanblackborough-random-grab-bag/health.svg)

```
[![Health](https://phpackages.com/badges/deanblackborough-random-grab-bag/health.svg)](https://phpackages.com/packages/deanblackborough-random-grab-bag)
```

###  Alternatives

[qcod/laravel-imageup

Auto Image upload, resize and crop for Laravel eloquent model using Intervention image

775113.8k](/packages/qcod-laravel-imageup)[ctessier/nova-advanced-image-field

An advanced image field for Nova with cropping and resizing.

103548.4k1](/packages/ctessier-nova-advanced-image-field)[coffeecode/cropper

It is a easy and simple PHP image cropper and cache thumb manager

25160.1k3](/packages/coffeecode-cropper)[francodacosta/phmagick

image manipulation with php and ImageMagick

3869.7k1](/packages/francodacosta-phmagick)[ayvazyan10/nova-imagic

Imagic is a Laravel Nova field package that allows for image manipulation capabilities, such as cropping, resizing, quality adjustment, and WebP conversion. It utilizes the powerful Intervention Image class for image manipulation.

144.3k1](/packages/ayvazyan10-nova-imagic)[maxmirazh33/yii2-uploadable-cropable-image

Yii2 extension for upload and crop images

1020.8k](/packages/maxmirazh33-yii2-uploadable-cropable-image)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
