Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.44 KB

description.rst

File metadata and controls

62 lines (44 loc) · 1.44 KB

Aztec Code generator in Python

Dependencies

Pillow - Python Imaging Library

Usage

data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.save('aztec_code.png', module_size=4)

This code will generate an image file aztec_code.png of an Aztec Code containing the text "Aztec Code 2D :)".

Aztec Code with data

data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.print_out()

This code will print out the resulting 19×19 (compact) Aztec Code to standard output as text.

      ##  # ## ####
 #   ## #####  ###
 #  ##  # #   # ###
## #  #    ## ##
    ## # #    # #
## ############ # #
 ### #       ###  #
##   # ##### # ## #
 #   # #   # ##
 # # # # # # ###
    ## #   # ## ##
#### # ##### ## #
  # ##       ## ##
 ##  ########### #
  ##    # ##   ## #
     ## # ### #  ##
      ############
##   #     # ##   #
##  #    ## ###   #

Authors

Written by Dmitry Alimov (delimtry) and packaged by Daniel Lenski (dlenski).

License

Released under The MIT License.