# How to add jpeg format to dot (directed graphics command)

I am trying to create a jpeg using "dot" command, as follows:

    dot -Tjpg titanic.dot -o titanic.jpg


dot complains that jpg isn't a recognized format. I am able to produce a png, but I would like a jpg. The manual page states that jpg is usually one of the built-in formats it is capable of. However, on Fedora 28 I get the following error:

Format: "jpg" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4 xdot_json


thanks

edit retag close merge delete

1

Its possible that the version of dot that you're using doesn't have jpeg support complied in as your output doesn't mention jpeg/jpg. On my F27, my format string has "jpeg:cairo:gdk jpg:cairo:gdk".

( 2018-10-22 17:21:48 -0600 )edit

Sort by » oldest newest most voted

Would you happen to have the correct supporting libs? I read that you can see what your system is capable of by running

dot -T?


but wouldn't know myself having never used it. The man page at https://linux.die.net/man/1/dot , however, didn't mention jpg as a output type... i am not on my Fedora rig to see the actual Fedora installed man page.

I hope it helps and sorry if it does not.

more