Legofy is a python program that takes a static image or gif and makes it so that it looks as if it was built out of LEGO.
- Python
- Python modules: Pillow, click
- imagemagick
If you find a bug:
- Check in the open issues if the bug already exists.
- If the bug is not there, create a new issue with clear steps on how to reproduce it.
$ git clone https://github.com/JuanPotato/Legofy.git
$ cd Legofy
$ python setup.py install
$ legofy image.jpg # anywhere
--bricks number
- specify the largest amount of bricks a side of the resulting image should have. (eg. make the legofied image bigger)--brick brick
- specify the brick asset to be used in legofying. Should be a 30x30 greyscale image close to 128,128,128 as the base color.--palette
- specify the palette used, allows you to use only lego colors, see below.
There are 3 palettes: solid (33 colors), transparent (14 colors) and effects (4 colors). You can use one of them or all the 3.
$ legofy --palette solid image.jpg
$ legofy --palette transparent image.jpg
$ legofy --palette effects image.jpg
$ legofy --palette all image.jpg
There is another one palette, mono, with only 2 colors (black and white...). It's just for test and fun...
ValueError: --enable-zlib requested but zlib not found, aborting.
- try
xcode-select --install
in the terminal
- try
ValueError: --enable-jpeg requested but jpeg not found, aborting.
- install libjpeg
Incompatible library version: libtiff.X requires version X or later, but libjpeg.X provides version X
- Follow instructions here