skip to navigation
skip to content

triangulizor 1.0.2

Triangulize your images!

Triangulizor is a little Python script to apply a “triangular pixel” effect to images, like so:



Use pip to install:

pip install triangulizor


Command Line Usage

First, find an image to triangulize! To generate the example above, either of these commands will do the trick:

$ triangulizor --show --tile-size=16 examples/in.jpg

The --show flag will cause the resulting image to be displayed immediately instead of written to stdout or to disk. You can also pass in the URL to an image that you want to process:

$ triangulizor --show --tile-size=16

All command line options are given below:

$ triangulizor --help


usage: triangulizor [-h] [-t TILE_SIZE] [-v] [-vv] [-s] [infile] [outfile]

Applies a "triangular pixel" effect to an image.

positional arguments:
  infile                Image to process (path or URL; defaults to STDIN)
  outfile               Output file (defaults to STDOUT)

optional arguments:
  -h, --help            show this help message and exit
  -t TILE_SIZE, --tile-size TILE_SIZE
                        Tile size (should be divisible by 2)
  -v, --verbose         Verbose output
  -vv                   Very verbose output
  -s, --show            Immediately display image instead of writing to

Library Usage

Triangulizor can also be used as a plain old Python library:

>>> import triangulizor
>>> triangulizor.triangulize('examples/in.jpg', 24)
<Image._ImageCrop image mode=RGB size=384x216 at 0x10A5BA758>


This was inspired entirely by this awesomely helpful blog post by @revdancatt.

File Type Py Version Uploaded on Size
triangulizor-1.0.2.tar.gz (md5) Source 2014-03-16 5KB
  • Downloads (All Versions):
  • 9 downloads in the last day
  • 42 downloads in the last week
  • 222 downloads in the last month