I narrowed down the problem:
Your file works fine for me as well.
The problem lies within the path to the image and if file extension is specified in the latex file. I have broken it down to 9 cases. see below for details
Conclusion:
Image conversion works fine from within LyX and with exported .tex as long as:
1) The .tex and the image files are on the same partion and
2) one specifies relative paths i.e. without using the drive letter in the LyX Include (which is exported to Latex include graphics command), and
3) have a file extension in the include graphics command.
In the case the tex source and the image files are on separate partitions, maybe the variable $GRAPHICS_PATH that could be set to take care of the problem.
Could this be set automatically and temporarily from within LyX by using the info that is available in LyX include about the image location?
hope this message will help someoneelse with similar problems under windows XP and several partitions.
jorgen
If he file image.jpg and tex-source are in the same directory C:/path_to_image/
Case 1: Works fine (from within Lyx and from exported tex file) {image.jpg} or {image} or {../path_to_image/image.jpg}
The jpg image that is scaled and displayed properly by the browser, but if chooses to view the image within the browser the full sized image is shown. I.e. there was no resizing of the image (I wanted resizing, but with original color depth, i.e. 24) during the L2H call.
Case 2: Fails {../path_to_image/image} or {C:/path_to_image/image} In this case the image conversion fails.
Case 3: Peculiar
{C:/path_to_image/image.jpg}
A peculiar result: The image is dislayed by the browser, but in grey scale (256 shades) and the image WAS resized and converted to "image_type" setting i.e. gif/png/jpg.
Case 4: Peculiar
(from within Lyx):
{C:/path_to_image/image.jpg}
the path to the image is in reality more complicated since LyX copies the image to a temporary directory, but the result is similar to Case 3 but now the image is in color instead.
If the image is within a subdirectory 'images' relative to the directory given above:
Case 5: The same result as with case 3. {C:/path_to_image/images/image.jpg}
Case 6: works fine see Case 1 {images/image.jpg}
If the image is within a directory 'images' on the same partition as the tex source but not a subdirectory. E.g. C:/path_to_image2/images/image.jpg
Case 7: works fine see case 1 {../images/image.jpg}
Case 8: Fails {../images/image}
Case 9 : Peculiar see case 3 {C:/path_to_image2/images/image.jpg}
Herbert Voss wrote:
as I said, the problem with LyX is, that you need an exported TeX file, but LyX doesn't know, that it should not use latex, because in this case the jpeg image is converted to eps and then back to jpg by latex2html.
(I am not sure if that is the correct interpretation.)