ppareit / graphviz-dot-mode

Emacs mode for the DOT language, used by graphviz.
https://ppareit.github.io/graphviz-dot-mode
GNU General Public License v2.0
217 stars 48 forks source link

graphviz-dot-preview doesn't work - PNG error: IEND: CRC error #75

Open esbon125 opened 10 months ago

esbon125 commented 10 months ago

Hi, I installed the package from MELPA, and everything went fine until I tried to preview my graph. I tried the next example and didn't work: image I thought maybe my emacs was bad setup, but from dired C-t i worked perfectly. In Messages buffer, when i preview I get the next error. PNG error: IEND: CRC error [2 times]. I used .gv file in case it matters. Sorry for bothering.

andrewpeck commented 9 months ago

I get the same message-- I worked around it by changing the generated extension to svg

(setq graphviz-dot-preview-extension "svg")

I have not looked into it further but will try to dig around when I find time.

epost commented 6 months ago

@corrafig Won't setting :coding 'binary break SVG (i.e. text) previews?

corrafig commented 6 months ago

@epost I tested preview output as SVG and it worked as before. However, it's true that preferably there would be a map from graphviz-dot-preview-extension to coding (text/binary).