.eps files generated by Matlab seem to sometimes convert
badly for display in the lyx editor window, although they appear
correctly in the previewer.
The problem can traced to a problem in ghostscript. The
lyx standard converter calls
convert "-depth 8" $$i $$o
which calls gs, with the device set as below. The example below
shows only the essential options of the many options invoked by
convert.
convert "-depth 8" a.eps b.bmp
constructs the call
gs -dBATCH -dNOPAUSE "-sDEVICE=bmpsep8" -sOutputFile=b.bmp a.eps
With some Matlab-generated .eps files, this will produce sparse
oblique dotted lines in the .bmp file.
I am using
lyx 1.5.2
ImageMagick-6.2.8.0-4.fc6
ghostscript-8.15.4-1.fc6
Linux / Fedora Core 6
The problem is described in a post:
"convert c.eps d.jpg unreliable"
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=8546
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Work around:
With testing thus far, conversion seems to working with
the following modification of the standard ImageMagick
installation. The working around avoids using the "bmpsep8"
output device of ghostscript.
change "-sDEVICE=bmpsep8" to "-sDEVICE=bmp16"
in ImageMagick's delegates.xml file. On my installation it is at
/usr/lib64/ImageMagick-6.2.8/config/delegates.xml
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This modifies the call to gs to something like (many options omitted)
convert "-depth 8" a.eps b.bmp
constructs the call
gs -dBATCH -dNOPAUSE "-sDEVICE=bmp16" -sOutputFile=b.bmp a.eps
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Do other people have the problem of .eps files not previewing
correctly. Is there an easy fix that I missed.
Cheers
Brian