Skip to content

Build pictures with LEGO® or any other compatible bricks.

License

Notifications You must be signed in to change notification settings

lucaswo/Pic2Brick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pic2Brick

Build pictures with LEGO® or any other compatible bricks.

There should be an image here.

Install

Just get all packages with (make sure that you are using Python 3):

pip3 install -r requirements.txt

Usage

The pic2brick.py script can be executed via

python3 pic2brick.py [options]

The options should be printed if you call python3 pic2brick.py -h

>>> python3 pic2brick.py -h
usage: pic2brick.py [-h] -i INPUT -o OUTPUT [-l LABELS] [-sm SMOOTH] [-s SIZE]
                 [-ms MAXSIZE] [-rgb RGB]

Build your image with bricks.

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input image
  -o OUTPUT, --output OUTPUT
                        Output xml file.
  -l LABELS, --labels LABELS
                        If not zero, labels are set in the instructions to clarify colors.
                        Defaults to 0.
  -sm SMOOTH, --smooth SMOOTH
                        Smoothing factor for prefiltering. Increase for
                        removing artifacts. Can only be odd. Defaults to 1.
  -s SIZE, --size SIZE  
                        Max size for the output image in pixels/studs.
                        Defaults to 32.
  -ml MAXLENGTH, --maxlength MAXLENGTH
                        Max length of an individual LEGO plate in studs.
                        Defaults to 12.
  -mw MAXWIDTH, --maxwidth MAXWIDTH
                        Max width of an individual LEGO plate in studs.
                        Defaults to 6.
  -lab LAB              
                        If not zero, LAB is used for distances between pixels,
                        otherwise RGB. Defaults to 1.

Have fun bricking around!

LEGO® is a registered trademark of the LEGO group of companies and does not sponsor, authorize, or endorse this project.

About

Build pictures with LEGO® or any other compatible bricks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages