[NTG-pdftex] pdftex in dvi mode and reading JPEG files

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Oct 25 14:07:59 CEST 2006

On Wed, Oct 25, 2006 at 01:21:40PM +0200, Eric.Brunet at lps.ens.fr wrote:

> I have always found annoying that pdftex and latex don't accept the same
> formats of image files (jpg,png,pdf versus eps). It doesn't really make
> sense, as including a JPEG into a postscript file is a very easy operation
> since postscript 2.0.

But there are lots of different drivers: dvips, dvipsone, VTeX, ...
The main problem is a missing standard for graphics inclusion and other
things that extends the DVI format specification.

> It annoys me so much that I am trying to change that. So far, I have
> written a patch for dvips (the version in the texlive) which makes dvips
> able to read and embed JPEG files into a postscript.

There is no need to patch, dvips already can convert and embed
files on the fly. (See the last argument of \DeclareGraphicsRule,
check dvips (configuration) options for enabling the feature,
if it is disabled.)

> The next step is
> adding LaTeX support. As it stands, one can use my patched dvips with a
> LaTeX file looking like
> 	...
> 	\usepackage{graphicx}
> 	\DeclareGraphicsRule{.jpg}{eps}{}{}
> 	...
> 	\includegraphics[bb=0 0 width height]{bla.jpg}
> 	...
> where width and height are the dimension (in bp) of bla.jpg.

No need for this, look at package bmpsize!

> It works, but it is not very ergonomic. It would be much nicer if LaTeX
> were able to read by itself the size of the picture.

pdfTeX >= 1.30 and package bmpsize.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

More information about the ntg-pdftex mailing list