Opened 19 years ago

Closed 17 years ago

#2235 closed defect (fixed)

jpeg graphics with suffix in capital letters (.JPG) does not work with pdflatex

Reported by: rubin@… Owned by: leeming
Priority: high Milestone: 1.6.0
Component: insetgraphics Version: 1.6.0svn
Severity: major Keywords: regression
Cc: younes@…, syntheticpp@…, dany@…

Description

This was motivated by a problem someone else posted.

In the attached example, if you strip out the 'type=jpg' option from
\includegraphics, the document displays properly as DVI, PDF (dvipdfm) and PDF
(ps2pdf), but pdflatex spits up an error message about an unrecognized graphics
type JPG. I thought that adding 'type=jpg' would cure that, but instead it made
it worse. None of the alternatives can size the graphic, they all give division
by zero errors, and all but pdflatex have an error message like the following:

Can not include graphics of type: jpg.

...2/lyx_tmpbuf0/0Ctemp_clouds\string".eps}

(Note the discrepancy between the .eps file extension and the jpg file type.)

Looks like LyX may be failing to modify the type argument when it switches from
jpg to eps in the temp directory. Maybe the answer is just to tell people they
have to use standard file extensions (including case) if they want to use pdflatex?

Attachments (3)

type_bug.zip (5.5 KB ) - added by rubin@… 19 years ago.
LyX doc and small jpg file
2235-2.diff (2.0 KB ) - added by Georg Baum 19 years ago.
better fix
2235.diff (2.0 KB ) - added by Georg Baum 19 years ago.
fix

Download all attachments as: .zip

Change History (20)

by rubin@…, 19 years ago

Attachment: type_bug.zip added

LyX doc and small jpg file

comment:1 by Georg Baum, 19 years ago

Milestone: 1.4.1
Summary: type= option in \includegraphics not handled correctly?jpeg graphics with suffix in capital letters (.JPG) does not work with pdflatex

Thanks, now I see where the problem is: LyX recognizes the file format (jpeg)
from the contents. It knows that pdflatex can handle this format natively,
therefore no conversion is done.
Unfortunately pdflatex does not know the JPG suffix (only jpg), so it
complains. The same problem probably happens also with png <-> PNG and other
file formats that can be directly handled by the backend.
The workaround for now is easy: rename the file to clouds.jpg, and it should
work.

comment:2 by lasgouttes, 19 years ago

So Georg, are we going to do something about it?

comment:3 by Georg Baum, 19 years ago

Keywords: patch added

by Georg Baum, 19 years ago

Attachment: 2235.diff added

fix

comment:4 by Georg Baum, 19 years ago

attachments.isobsolete: 01

comment:5 by lasgouttes, 19 years ago

What is the reason why we do not want to use type=jpg instead?

comment:6 by Georg Baum, 19 years ago

It did not work for me, but I forgot the details. I can try again if you like.

comment:7 by Georg Baum, 19 years ago

Milestone: 1.4.11.4.2

comment:8 by Georg Baum, 19 years ago

Resolution: fixed
Status: newclosed

fixed in 1.5svn and 1.4svn.

comment:9 by Georg Baum, 17 years ago

Cc: dany@… added

comment:10 by Georg Baum, 17 years ago

* #4759 has been marked as a duplicate of this bug. *

comment:11 by Georg Baum, 17 years ago

Keywords: patch removed
Resolution: fixed
Status: closedreopened

bug reappeared.

comment:12 by Uwe Stöhr, 17 years ago

Keywords: regression added
Milestone: 1.4.21.6.0
Version: 1.3.71.6.0svn

Not in LyX 1.5, only in 1.6svn.

comment:13 by dany@…, 17 years ago

Tried 1.6.0RC1 and it gave me the same error with .JPG files.

comment:14 by Uwe Stöhr, 17 years ago

Cc: younes@… added
Severity: minormajor

comment:15 by Uwe Stöhr, 17 years ago

Still the case and a must fix for LyX 1.6.0. LyX's LaTeX output is the same as
LyX 1.5.6's the problem is in our FileName.cpp:

D:\LyXSVN\lyx-devel\src\support\FileName.cpp(238): Could not move file C:/Docume
nts and Settings/usti/Local Settings/Temp/lyx_tmpdir.Uhg712/lyx_tmpbuf0/0DDown
load_01.JPG to C:/Documents and Settings/usti/Local Settings/Temp/lyx_tmpdir.Uhg
712/lyx_tmpbuf0/0D
Download_01.jpg

Abdel, Peter?

comment:16 by Uwe Stöhr, 17 years ago

Cc: syntheticpp@… added

comment:17 by syntheticpp@…, 17 years ago

This should fix it:
http://www.lyx.org/trac/changeset/26744
Please verify.

comment:18 by Uwe Stöhr, 17 years ago

Resolution: fixed
Status: reopenedclosed

Indeed fixed, thanks.

Note: See TracTickets for help on using tickets.