Giter Club home page Giter Club logo

pic2brick's Introduction

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.

pic2brick's People

Contributors

lucaswo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.