LB wrote:
Hi

When the image does not preview, the last a few lines in the debug window are:
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

I need to "quit" Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `<file name is here>.ps'.
convert.exe: missing an image filename `ppm:<file name is here>.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of "convert" failed.

Whereas when the image previews ok the last few lines in the debug window are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
       params.scale       : 100
       width              : 497
       height             : 404


It appears that "Image conversion succeeded" does not appear when the image does not show in Lyx. It also look like that having the file deep in a long tree of subdirectories contributes to this problem as the same file work fine when placed in C:\ directory.

Why I only have this problem with one particular figure is still very puzzling.


When LyX needs to display your image, it calls the convertDefault.sh script, which in turn calls ImageMagick's convert.exe program to convert test.ps to test.ppm. ImageMagick then uses Ghostscript to read the .ps file. Judging by the fact that Ghostscript "hangs open" until you close it, and the "missing filename" bit later on, it looks to me as if the ImageMagick-to-Ghostscript call might somehow have lost or mangled the file name (?!). There's some relevant output just above the first line you quoted that would help.

If you want to investigate this possibility, try the following. In the LyX Resources\scripts, find convertDefault.sh and open it with a text editor (e.g., notepad). Find the lines

# converts an image from $1 to $2 format
convert -depth 8 "$1" "$2" || {

and insert

echo "Converting $1 to $2 ..."

between them. Then run with -dbg graphics again. You should get output similar to what I got (albeit with different paths):

        No converter defined! I use convertDefault.sh
sh "C:/Program Files/LyX142/Resources/scripts/convertDefault.sh" "eps:C: /Documents and Settings/<your id here>/Desktop/test.ps" "ppm:C:/Temp/lyx_tmpdir5
620a03976/test5620a03976.ppm"
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/Documents and Settings/<your id here>/Desktop/test.ps to ppm:C
:/Temp/lyx_tmpdir5620a03976/test5620a03976.ppm ...
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.

Do the file names and paths look right when you do this?

/Paul

Reply via email to