PHPackages                             ricardofiorani/php-legofy - 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. [Image &amp; Media](/categories/media)
4. /
5. ricardofiorani/php-legofy

ActiveLibrary[Image &amp; Media](/categories/media)

ricardofiorani/php-legofy
=========================

A PHP Port of Legofy

v1.0.1(7y ago)16661711[1 PRs](https://github.com/ricardofiorani/php-legofy/pulls)MITPHPPHP ^7.1

Since Sep 28Pushed 5y ago7 watchersCompare

[ Source](https://github.com/ricardofiorani/php-legofy)[ Packagist](https://packagist.org/packages/ricardofiorani/php-legofy)[ RSS](/packages/ricardofiorani-php-legofy/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

PHP Legofy
==========

[](#php-legofy)

[![Build Status](https://camo.githubusercontent.com/022c8e261d951d1c9beaa634d308372fb62df16385c8517df71d5a3e98b75c94/68747470733a2f2f6170692e7472617669732d63692e6f72672f7269636172646f66696f72616e692f7068702d6c65676f66792e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/ricardofiorani/php-legofy)[![Minimum PHP Version](https://camo.githubusercontent.com/19fbe08ea8f95694b07783c176c57d5241ca7dc456452b85431e4effba565d17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7269636172646f66696f72616e692f7068702d6c65676f66792e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/1be2ecd07f133c5dd676bf18d68efddb5369ed71c8f6e9d25c23a2121cc775dc/68747470733a2f2f706f7365722e707567782e6f72672f7269636172646f66696f72616e692f7068702d6c65676f66792f6c6963656e73652e706e67)](https://packagist.org/packages/ricardofiorani/php-legofy)[![Total Downloads](https://camo.githubusercontent.com/c2a9ab59fb340aee49c28e58740898355f03edfad26c7bf23549f67f4dfe5f90/68747470733a2f2f706f7365722e707567782e6f72672f7269636172646f66696f72616e692f7068702d6c65676f66792f642f746f74616c2e706e67)](https://packagist.org/packages/ricardofiorani/php-legofy)[![Coding Standards](https://camo.githubusercontent.com/bbde1fa96ef88cc4935dac2851741d5045ad4e348558501bc1031ca96926c7ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f63732d5053522d2d342d79656c6c6f772e737667)](https://github.com/php-fig-rectified/fig-rectified-standards)

### What is this ?

[](#what-is-this-)

PHP Legofy is a PHP package that takes a static image and makes it so that it looks as if it was built out of LEGO.
It was inspired by the original Legofy made in Python

Basically it transforms this: [![Image of a beer](./assets/examples/beer.jpg)](./assets/examples/beer.jpg)Into this: [![Image of a legofied beer](./assets/examples/lego-beer.jpeg)](./assets/examples/lego-beer.jpeg)

### Requirements

[](#requirements)

- PHP ^7.1 || ^8.0
- GD or ImageMagick

> I tested it with GD only but I'm trusting intervention/image that this will work on ImageMagick as well.

### Quickstart

[](#quickstart)

Via composer:

```
$ composer require ricardofiorani/php-legofy
```

Via source:

```
$ git clone git@github.com:ricardofiorani/php-legofy.git
$ cd php-legofy
$ composer install
```

### Usage:

[](#usage)

```
