[posted and mailed]

Angus Leeming <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:

> Could you augment conversionDefault.sh please. I want to establish 
> whether it is invoked successfully by LyX.
> 
> .... Ahhh. I see one problem with the script...
> 
> This:
> FILE=`echo $2 | cut -d ':' -f 2`
> will return 'C', not 'your/file.ppm' from the string 
> 'ppm:C:your/file.ppm'.
> 
> Let's use 
> FILE=`echo $2 | sed ',^[^:]*:,,'`
> instead.
> 
> Could you replace your copy of convertDefault.sh with the one 
> attached. Running LyX from the command line should produce some 
> additional messages if the script is invoked successfully.

Done.  Started a new document and tried to insert (and view) happy.jpg.  
I don't have a convert for .JPG defined, so it used the default.  
Pertinent output follows:

===============
Loading image.
just Loaded.
pixmap isNull 0 xformed_pixmap_ isNull 0
Image loading succeeded.
GraphicsImage::getScaledDImensions()
        params.scale       : 100
        width              : 425
        height             : 290
pixmap isNull 0 xformed_pixmap_ isNull 0
setPixmap()
The font scaling factor is 129.6
[readBB_from_PSFile] no(e)ps-format
[controller().bb_Changed set to true]> 
[controller().bb_Changed set to tru> e]
[controller().bb_Changed set to t> rue]
[controller().bb_Changed set to>  true]
        The file is not readable
Recognised Fileformat: jpg
[GrahicsCacheItem::convertToDisplayFormat]
        Attempting to convert image file: C:/LyX/Documents/happy.jpg
        with displayed filename: C:/LyX/Documents/happy.jpg
Recognised Fileformat: jpg

        The file contains jpg format data.
Unable to convert from jpg to bmp
Unable to convert from jpg to pbm
Unable to convert from jpg to pgm
Unable to convert from jpg to png
Unable to convert from jpg to ppm
Unable to convert from jpg to xbm
Unable to convert from jpg to xpm
        Converting it to ppm format.
Converter c-tor:
        from_file:      C:/LyX/Documents/happy.jpg
        to_file_base: C:/LyX/lyx/tmp/lyx_tmpdir4020a03188/happy4020a03188
        from_format:  jpg
        to_format:    ppm
build_script ... ready (edgepath.empty())
        No converter defined! I use convertDefault.sh
        sh C:/LyX/lyx/share/lyx/scripts/convertDefault.sh 
jpg:C:/LyX/Documents/h
appy.jpg ppm:C:/LyX/lyx/tmp/lyx_tmpdir4020a03188/happy4020a03188.ppm
C:/LyX/lyx/share/lyx/scripts/convertDefault.sh invoked as:
jpg:C:/LyX/Documents/happy.jpg 
ppm:C:/LyX/lyx/tmp/lyx_tmpdir4020a03188/happy4020
a03188.ppm
C:/LyX/lyx/share/lyx/scripts/convertDefault.sh ERROR
Unable to find file 
"C:/LyX/lyx/tmp/lyx_tmpdir4020a03188/happy4020a03188.ppm"
Image conversion failed.
Unable to find converted file!
===============

The directory C:/LyX/lyx/tmp/lyx_tmpdir4020a03188 exists and is empty.

-- Paul

Reply via email to