• Stars
    star
    3,147
  • Rank 14,288 (Top 0.3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Make images look as if they are made out of 1x1 LEGO blocks

Legofy Build Status PyPI Downloads PyPI version License Coverage Status Code Health Join the chat at https://gitter.im/JuanPotato/Legofy

What is it?

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.

Before

After

Requirements

  • Python
  • Python modules: Pillow, click # pip will install these automatically if using pip install legofy
  • imagemagick # not needed but recommended

Bugs

If you find a bug:

  1. Check in the open issues if the bug already exists.
  2. If the bug is not there, create a new issue with clear steps on how to reproduce it.

Quickstart

$ pip install legofy

or install from source

$ git clone https://github.com/JuanPotato/Legofy.git
$ cd Legofy
$ python setup.py install

Wait! I don't know what any of this means? Use pip then, or if you really want to install from source have some help.

Usage

Usage: legofy [OPTIONS] IMAGE [OUTPUT]

  Legofy an image!

Options:
  --size INTEGER                  Number of bricks the longest side of the legofied image should have.
  --dither / --no-dither          Use dither algorithm to spread the color approximation error.
  --palette [all|effects|mono|solid|transparent]
                                  Palette to use based on real Lego colors.
  --help                          Show this message and exit.

Palette

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...

Troubleshooting

Installation

  1. Download and install all requirements
  1. Download this project by using the download zip button on this page, or running git clone https://github.com/JuanPotato/Legofy
  • If you downloaded a zip file, please unzip it
  1. Open a command line and navigate to the project folder
  2. Run python setup.py install while in the project folder
  3. You can now use Legofy anywhere, see usage for more help

Forks

More Repositories

1

Tofu

The complete opposite of a font
Python
234
star
2

unicode_bot

telegram bot for giving unicode information
Rust
23
star
3

vail

WIP MTProto implementation in Rust
Rust
18
star
4

rust-tg-botapi

Telegram bot api wrapper in Rust
Rust
12
star
5

Powershell-Telegram-Bot

PowerShell
12
star
6

GitHub-WinClassic

Windows Classic style for GitHub
CSS
11
star
7

AutoTG

A script to automatically generate a json serialization of the telegram bot api documentation to easily generate libraries.
Python
10
star
8

joycontrolrs

Rust port of joycontrol
Rust
9
star
9

Activity-Scraper

Python
7
star
10

Youtube-Distant-Sound

Volume fades as you scroll away from the video
JavaScript
6
star
11

Lua-tg

tg-cli tcp commands sender for lua
Lua
5
star
12

JargonBot

Go
3
star
13

ProgTech-Bot

Telegram bot used for, stuff...
Python
3
star
14

aoc

my bad code for adventofcode.com
Python
2
star
15

botato

user-configurable telegram bot
Rust
2
star
16

-OLD-UnicodeInfoBot

See https://github.com/JuanPotato/unicode_bot
Go
2
star
17

dotfiles

β€€β€₯… βΈ¬ : ⁝ ⁞ Β· ⁚ ⁖ ⁘ ⁙
Shell
2
star
18

Wallpaper-of-Life

Interactive i3 wallpaper displaying Conway's Game of Life
Rust
2
star
19

sed_bot

Telegram bot to do s/.../.../ replacements
Rust
1
star
20

PasteBot

Telegram bot to let you send messages such as shrugs to copypastas from inline
Rust
1
star
21

charname

Unicode character name library in rust with slight modifications
Rust
1
star
22

mednat

Rust
1
star
23

braillify

Rust
1
star
24

bitorder

Library to read and write bits in lsb or msb order.
Rust
1
star
25

pi-pico-pi

Calculating 1 million digits on the Raspberry Pi Pico
C
1
star
26

XKCD-search-bot

It works
Rust
1
star
27

my_first_async_calculator.rs

Rust
1
star
28

OP-Forum-Extensions

Chrome extensions for the Oneplus Forum
JavaScript
1
star
29

Wordle-Solver

Rust
1
star