0

I have a PNG image created from VISIO under windows which I tried to use in LaTeX. However, every linux program (LaTeX, Okular, GimP) claims the file is corrupted, however, it shows up fine in Chrome. Is there a way to convert the images (preferably in linux) so that LaTeX, Okular and Gimp understand the file?

Currently on Centos 7, with libpng and libpng12 installed.

enter image description here

Attempt with convert:

convert nn_generic_cell.png nn_generic_cell_converted.png  
convert: Invalid palette \`nn_generic_cell.png' @ error/png.c MagickPNGErrorHandler/1751. 
convert: corrupt image \`nn_generic_cell.png' @ error/png.c/ReadPNGImage/3789.  
convert: no images defined \`nn_generic_cell_converted.png' @ error/convert.c/ConvertImageCommand/3046.  
3
  • Do you have imagemagic's convert program?
    – Jeff Schaller
    Mar 26, 2016 at 0:10
  • @JeffSchaller I am not familiar with convert, but I guessed parameters and as you can see in the updated question, it did not work.
    – ted
    Mar 26, 2016 at 0:57
  • 2
    Is exporting to a different format an option, like TIFF? It sounds like Visio is producing garbage PNGs. You might also try exporting the diagram as PDF or eps, if you can -- I use PDF diagrams with pdflatex, and regular LaTeX should be able to consume eps. Mar 26, 2016 at 2:28

1 Answer 1

0

While the reasons are obscure to me, the PNGs created by Visio seem to be broken according to libpng. Opening the Visio PNGs in paint and saving them again solves the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .