On Friday 26 April 2002 6:01 pm, Rod Pinna wrote:
> OK, so I'm now a little confused, so I'll put my stupid luser hat on.
>
> I'm currently downloading bxform-089-glibc2.1.tgz from one of the ftp
> sites in the iINSTALL file. Will this allow lyx-1.2.0 to cleanly produce
> the insert previews, or do I need to look at updating convert as well?
>
> Imagemagik is at 5.2.5
>
> Sorry about asking what appear to be stupid question, but at the moment I
> am quite confused.
>
> Thanks alot everyone,
> Rod

My final HELP of the day (I'm off home).

The answer to your question is "depends..."

I thought you'd like that. Seriously, we're talking about different things. 

If you upgrade to a version of xforms with image support (0.89.X, X>=5ish), 
then you'll be able to use the xforms-based image loader. This loader can 
load several image formats natively. Running "lyx -dbg graphics", I get:

The image loader can load the following directly:
Windows/OS2 BMP file, extension "bmp"
NASA/NOST FITS, extension "fits"
CompuServ GIF, extension "gif"
JPEG/JFIF format, extension "jpg"
Portable Pixmap, extension "ppm"
Portable Graymap, extension "pgm"
Portable Bitmap, extension "pbm"
PostScript, extension "ps"
SGI Iris, extension "sgi"
Tag Image File Format, extension "tif"
X11 Bitmap, extension "xbm"
X Window Dump, extension "xwd"
XPM format, extension "xpm"

So, if your graphics file is in one of the above formats, it'll just load.

If, however, it ain't, then you'll need to convert it to one of the above. 
That's where convert comes in. Here I have deleted all ???->XPM converters 
because my version of "convert" can produce "nasty" XPM files. Instead I 
convert EPS files to PPM format and load that. I believe I've explained how 
to set LyX up to do that earlier.

Hope that this helps your understanding.

Have a good weekend,
Angus

For what it's worth, that same "lyx -dbx graphics" will also display the 
conversion script used by any converting process. Here's what LyX used to 
convert time_40.eps to ppm format here:

The file contains eps format data.
Converting it to ppm format.
Conversion script:

#!/bin/sh
infile='/usr/users/aleem/docs/Calgary2002/time_40.eps'
infile_base='/usr/users/aleem/docs/Calgary2002/time_40'
outfile='/tmp/lyx_tmpdir24933aaylfa/gconvert024933aaylfa.ppm'

convert ${infile} PPM:${outfile}

if [ $? -ne 0 ]; then
        'rm' -f ${outfile}
        exit 1
fi

if [ ! -f ${outfile} ]; then
        if [ -f ${outfile}.0 ]; then
                'mv' -f ${outfile}.0 ${outfile}
                'rm' -f ${outfile}.?
        else
                exit 1
        fi
fi

fromfile=${outfile}
tofile='/tmp/lyx_tmpdir24933aaylfa/time_4024933aaylfa.ppm'

'mv' -f ${fromfile} ${tofile}
if [ $? -ne 0 ]; then
        'cp' -f ${fromfile} ${tofile}
        if [ $? -ne 0 ]; then
                exit 1
        fi
        'rm' -f ${fromfile}
fi

Angus

Reply via email to