I just converted a .svg image to a .png with
the simple command:
convert file.svg file.png
This new png file displays fine in various image
display applications such as geeqie, eog (eye of gnome),
and ristretto.
However, when I read this .png into a latex document
this image does not display correctly and is mostly black.
Have people run into this before ?
I have never had an issue with a .png and latex before
and so I suspect that this is an issue with imagemagick
conversion.
Thanks.
svg to png conversion and latex
-
- Posts: 3
- Joined: 2013-02-18T12:52:46-07:00
- Authentication code: 6789
-
- Posts: 3
- Joined: 2013-02-18T12:52:46-07:00
- Authentication code: 6789
Re: svg to png conversion and latex
Ok, I just tried the -enhance flag, and the result did
create a .png that could be displayed correctly by
latex:
convert -enhance file.svg file.png
create a .png that could be displayed correctly by
latex:
convert -enhance file.svg file.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: svg to png conversion and latex
I do not see any connection between -enhance (a noise reduction filter) to your problem? Furthermore you would use -enhance after reading the input not before it. It is likely something with your SVG file and whether you have RSVG or IM SVG or some other SVG delegate installed. Though I am not an expert on SVG.
Re: svg to png conversion and latex
You should try to avoid a workflow that converts the SVG into a raster format and then imports it into LaTeX which is a vector format.
Try writing your original images as EPS and then importing that into LaTeX. See http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics
and other sites found by a google search for "svg latex", e.g., ftp://ftp.dante.de/tex-archive/info/svg ... FLaTeX.pdf
Try writing your original images as EPS and then importing that into LaTeX. See http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics
and other sites found by a google search for "svg latex", e.g., ftp://ftp.dante.de/tex-archive/info/svg ... FLaTeX.pdf
-
- Posts: 3
- Joined: 2013-02-18T12:52:46-07:00
- Authentication code: 6789
Re: svg to png conversion and latex
My workflow includes creating images with gnuplot
and I ran into the bug that is documented here:
http://groups.google.com/group/comp.gra ... 79a36a3712
The bug exists with .png images but not .svg images.
Yes, I _should_ avoid this workflow, but right now,
"convert -enhance" to gnuplot created .svg images
is a work-able solution.
and I ran into the bug that is documented here:
http://groups.google.com/group/comp.gra ... 79a36a3712
The bug exists with .png images but not .svg images.
Yes, I _should_ avoid this workflow, but right now,
"convert -enhance" to gnuplot created .svg images
is a work-able solution.