Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Image to OpenSCAD converter

Project description

img2scad - Convert images to OpenSCAD structures <>

Default syntax:

img2scad [-b|–base=N] [-l|–log] < input_file


For each pixel in the input, it will create a cube in the output. The height of the cube corresponds to the whiteness of the corresponding pixel.

If -b or –base is specified, all values will be shifted by that value. This can be positive or negative. This can be used to output zero values.

If -l or –log is specified, the logarithm of the grey values will be used for the output.


img2scad < example.png > example.scad
Convert example.png to example.scad.
img2scad -b 1 < example.png > example.scad
Convert example.png to example.scad, with a “bedrock” of height 1.
img2scad -b 2 -l < example.png > example.scad
Convert example.png to example.scad, taking the logarithm for the height and preserving the black pixels.



Please submit bug reports at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for img2scad, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size img2scad-0.4.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page