[Tex/LaTex] Converting a image file into a TikZ figure


Is there any possibility to convert an image file into TikZ/qTikZ code?
May be I can give the image I want.


Not only this picture, I have to convert lot. Because if we are working with JPG files it is giving so large file when we are going for a book and all.

And if we are working with TikZ fils its easy to work with and its giving less memory file only.

Best Answer

Short answer: No. Just keep using \includegraphics with your jpeg files.

Longer answer:

  • use something like inkscape or potrace (a command-line tool that has been assimilated into inkscape) to convert to some form of vector graphic (e.g. svg)
  • use something like SVG2TikZ to convert to tikz code
  • write and debug a script to batch-convert each image in your image folder into tikz code
  • start inserting large chunks of tikz into your document
  • realise that you have larger pdf files and worse-looking graphics
  • go back to using includegraphics with your jpeg files.

(Posted as community wiki, since it is a summary/extension of the partial answers posted as comments above... also, since it is not terribly helpful.)

Related Question