G. Milde wrote:
On 18.06.08, Abdelrazak Younes wrote:
G. Milde wrote:
On 17.06.08, Abdelrazak Younes wrote:

My guess is, that svg support in the image loader is new in QT 4.4 and
hence this option worked with QT < 4.4.
Svg support is not new, it is brought by the QtSvg4 library. AFAIK, we don't link with this library.
...
But maybe you're right that something has changed in Qt4.4 and that svg
is automatically loaded with QtGui. This needs more investigation...
So it might rather be the LyX 1.5.x > 1.5.5 upgrade that introduced the
"native" svg display.
Conclusion: this is a change in Qt4.4 that svg files are loaded directly without the need to link to QtSvg!

Well, the debug message says
  The image loader can load the following directly:
bmp, gif, ico, jpeg, jpg, mng, pbm, pgm, png, ppm, svg, tif, tiff, xbm, xpm,

This list is the format directly loadable by Qt. LyX polls Qt by calling QImageReader::supportedImageFormats(). If a Qt plugin adds eps format for example, it will be recognized automatically by LyX and won't need any conversion before being shown on screen.


  Of these, LyX recognises the following formats:
  bmp, gif, jpg, jpg, pbm, pgm, png, ppm, svg, tiff, xbm, xpm

And this is a subset of the former list that LyX knows about.


Does Qt image loader really find automatically which of the supported
formats are also recognised by LyX or is there some place in the lyx code
where this list is hard-coded?

The formats are the one defined in the Converter dialogs as result of the configure script. We should probably add a definition for SVG in there if that is not already the case.

If you choose the RasterImage template, the external inset provides the same functionality as the graphics inset. I agree this duplication of feature is very confusing and we should aim at merging the two inset somewhat. The advantage of the external inset is that, if you create a new template, you can play with how the transformation needed for latex export.

Can you also play with the transformation before the display in LyX to
override the "as-is" rendering of an SVG file?

It maybe possible to add this capability with the help of some script but I don't think this is possible right now. But you always can use the display option for scaling, rotation and clipping. Beware that the scale option for LateX is different from the LyX option.


Does the RasterImage template work for vector images as well (despite its
name)

Yes, seems to. We should probably change the naming.

or will the image be transformed to a bitmap?

That depends if it is directly showable by Qt (like in the svg case) or not. In the second case, LyX will transform the image to a raster image format as defined by the converters for this format before showing it on screen.

Abdel.

Reply via email to