Turns your raster images into tikz code. Use to recreate your images as PDFs. Output keeps bitmap properties.
Runs with questionable performance.
“Your scientists were so preoccupied with whether they could, they didn’t stop to think if they should.”
Intended as a CLI application. Use with 8-bit bitmap images without alpha channel. Use command line arguments to customize execution.
In a nutshell, run this tool like this:
python image2tikz.py -i <path/to/your/image>
For help, use the -h
argument:
python image2tikz.py -h
You can also create a Issue or Pull Request to help. Feedback is welcome.
See the example
directory of this repository for example input and output data.
Located there is a mandrill.png
.
Converted pixel info (script output) is saved as a .pgf
text file.
It can be compiled to .pdf
with LaTeX.
High resolution images quickly exceed tikz' maximum memory limit. Recommended image size is 32x32 pixel. You also may include this library in your tex document:
\usepackage{morefloats}
See requirements.txt
in this repository.