Re: Viewing images in lyx-1.2: Choice of the converter to use

2002-07-18 Thread Herbert Voss

Jan Warnking wrote:


> My original message was a somewhat academic question about lyx converting
> png->xpm->eps->ps, even though xpm can be loaded directly. Why the detour?
> This is not _really_ relevant, since I think the xpm->eps converter was
> not there by default, and I don't remember why I put it there. If you
> leave that out, there is only one route, png->xpm, which gets loaded
> correctly. Just an oddity.


you are right, the problem is the function which searches
for a loaddable format

- snip -
Of these, LyX recognises the following formats:
bmp, ppm, ps, tiff, xbm, xpm
- snip -

these are sorted, so ps is found before xpm.

should be done in a better way.

Herbert



-- 
http://www.lyx.org/help/




Re: Viewing images in lyx-1.2: Choice of the converter to use

2002-07-18 Thread Jan Warnking


> > Image conversion succeeded.
> > Loading image.
> > xforms image loader. Status : Converting PS ...
> > xforms image loader. Status : Loading PostScript
> > xforms image loader. Error : LoadPS: no page written!
> > Image loading failed.
> > xforms image loader. Status : Error Reading
> 
> the ps-support of xforms flimage seems to be buggy, that's
> the problem. disable it
> 
> 
>http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/frontends/xforms/xformsImage.C?r1=1.4&r2=1.5

I don't need to recompile to do that - can't I deactivate all converters
to postscript? Thank you for the info, though. Are there chances to get
working rendering of ps, eps or pdf back? A question concerning xforms
development, I guess? Not having to convert these would be nice.

My original message was a somewhat academic question about lyx converting
png->xpm->eps->ps, even though xpm can be loaded directly. Why the detour?
This is not _really_ relevant, since I think the xpm->eps converter was
not there by default, and I don't remember why I put it there. If you
leave that out, there is only one route, png->xpm, which gets loaded
correctly. Just an oddity.

Jan




Re: Viewing images in lyx-1.2: Choice of the converter to use

2002-07-17 Thread Herbert Voss

Jan Warnking wrote:

> On Thu, 11 Jul 2002, John Levon wrote:
> 
>>>By default a converter PNG->EPS is defined. Since I defined an EPS->PS
>>>converter, Lyx then converted PNG->EPS->PS and failed to load the image
>>>(see previous message). So I removed the PNG->EPS converter, so that the
>>>PNG->XPM get used. However, the images still didn't get loaded. "lyx -dbg
>>>graphics" shows that lyx converts PNG->XPM->EPS->PS! Lyx _can_ load xpm
>>>directly and does so, if I delete the EPS->PS converter.
>>>This is minor once one knows what happens. There are always ways to work
>>>around this, defining only the right converters. But it still seems odd.
>>>
>>You must have made a mistake somewhere, I think. I just tested 1.2.1cvs
>>and it converted my png to xpm directly, and loaded it via the xforms
>>image loader
>>
> 
> Do you have a xpm->eps converter defined? I don't remember why I defined
> that, but that is not the point. My point was that I would expect the
> shortest route to be chosen.
> Here is the output of lyx -dbg graphics for the case I mentioned:


> Attempting to convert image file: ~/lyxdocs/these/images/chap1_neurone.png
> with recognised extension: png.
> Scanstring: PNG
> Recognised Fileformat: png


[...]

 
> Converting it to ps format.


[..]


> Image conversion succeeded.
> Loading image.
> xforms image loader. Status : Converting PS ...
> xforms image loader. Status : Loading PostScript
> xforms image loader. Error : LoadPS: no page written!
> Image loading failed.
> xforms image loader. Status : Error Reading


the ps-support of xforms flimage seems to be buggy, that's
the problem. disable it

http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/frontends/xforms/xformsImage.C?r1=1.4&r2=1.5

Herbert

-- 
http://www.lyx.org/help/




Re: Viewing images in lyx-1.2: Choice of the converter to use

2002-07-17 Thread Jan Warnking

On Thu, 11 Jul 2002, John Levon wrote:
> > By default a converter PNG->EPS is defined. Since I defined an EPS->PS
> > converter, Lyx then converted PNG->EPS->PS and failed to load the image
> > (see previous message). So I removed the PNG->EPS converter, so that the
> > PNG->XPM get used. However, the images still didn't get loaded. "lyx -dbg
> > graphics" shows that lyx converts PNG->XPM->EPS->PS! Lyx _can_ load xpm
> > directly and does so, if I delete the EPS->PS converter.
> > This is minor once one knows what happens. There are always ways to work
> > around this, defining only the right converters. But it still seems odd.
> 
> You must have made a mistake somewhere, I think. I just tested 1.2.1cvs
> and it converted my png to xpm directly, and loaded it via the xforms
> image loader

Do you have a xpm->eps converter defined? I don't remember why I defined
that, but that is not the point. My point was that I would expect the
shortest route to be chosen.
Here is the output of lyx -dbg graphics for the case I mentioned:

Attempting to convert image file: ~/lyxdocs/these/images/chap1_neurone.png
with recognised extension: png.
Scanstring: PNG
Recognised Fileformat: png
Scanstring: PNG
Recognised Fileformat: png

The file contains png format data.

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"

Of these, LyX recognises the following formats:
gif, jpg, ps, xpm

Converting it to ps format.
Conversion script:

#!/bin/sh
infile='/home/jan/lyxdocs/these/images/chap1_neurone.png'
infile_base='/home/jan/lyxdocs/these/images/chap1_neurone'
outfile='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm.xpm'

convert ${infile} ${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

infile='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm.xpm'
infile_base='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm'
outfile='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm.eps'

convert ${infile} ${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

'rm' -f ${infile}

infile='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm.eps'
infile_base='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm'
outfile='/tmp/lyx_tmpdir17752l8QsWP/gconvert0177523rZhgm.ps'

gs -q -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pswrite -sOutputFile=${outfile}
${infile}

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
 
'rm' -f ${infile}
 
fromfile=${outfile}
tofile='/tmp/lyx_tmpdir17752l8QsWP/chap1_neurone17752eXed55.ps'
 
'mv' -f ${fromfile} ${tofile}
if [ $? -ne 0 ]; then
'cp' -f ${fromfile} ${tofile}
if [ $? -ne 0 ]; then
exit 1
fi
'rm' -f ${fromfile}
fi
 
 
Image conversion succeeded.
Loading image.
xforms image loader. Status : Converting PS ...
xforms image loader. Status : Loading PostScript
xforms image loader. Error : LoadPS: no page written!
Image loading failed.
xforms image loader. Status : Error Reading




Re: Viewing images in lyx-1.2: Choice of the converter to use

2002-07-10 Thread John Levon

On Wed, Jun 26, 2002 at 12:01:55PM +0100, Jan Warnking wrote:

> By default a converter PNG->EPS is defined. Since I defined an EPS->PS
> converter, Lyx then converted PNG->EPS->PS and failed to load the image
> (see previous message). So I removed the PNG->EPS converter, so that the
> PNG->XPM get used. However, the images still didn't get loaded. "lyx -dbg
> graphics" shows that lyx converts PNG->XPM->EPS->PS! Lyx _can_ load xpm
> directly and does so, if I delete the EPS->PS converter.
> This is minor once one knows what happens. There are always ways to work
> around this, defining only the right converters. But it still seems odd.

You must have made a mistake somewhere, I think. I just tested 1.2.1cvs
and it converted my png to xpm directly, and loaded it via the xforms
image loader

regards
john
-- 
"I hope you will find the courage to keep on living 
 despite the existence of this feature."
- Richard Stallman



Viewing images in lyx-1.2: Choice of the converter to use

2002-06-26 Thread Jan Warnking


By default a converter PNG->EPS is defined. Since I defined an EPS->PS
converter, Lyx then converted PNG->EPS->PS and failed to load the image
(see previous message). So I removed the PNG->EPS converter, so that the
PNG->XPM get used. However, the images still didn't get loaded. "lyx -dbg
graphics" shows that lyx converts PNG->XPM->EPS->PS! Lyx _can_ load xpm
directly and does so, if I delete the EPS->PS converter.
This is minor once one knows what happens. There are always ways to work
around this, defining only the right converters. But it still seems odd.

Jan

PS : This has been verified using lyx1.2.1cvs as of june 22 on
Solaris(sparc) 2.7, xforms 0.89.6 and Image Magick 5.4.5.