[Tugindia] how to include .tif graphics ?

David Kastrup tugindia@tug.org
24 Oct 2002 23:07:57 +0200


Dileep Padinjarae Vengasseri <dileep_pv@yahoo.com> writes:

> I would like to know one more thing. How is pdftex
> supporting other graphics formats (other than eps)?

By directly interpreting the corresponding PDF specials, reading the
files in question and embedding them.  PDFTeX is an extension of the
normal TeX engine.  In contrast, standard LaTeX just writes out
"special" instructions into the DVI file without reading any files
itself, and the Dvips program then interprets those specials and
inserts the appropriate graphics.  Since the functionality of Dvips
is more or less integrated with PDFTeX when it is writing PDF files,
it has better and more access to things like image dimensions than
LaTeX has (EPS bounding box reading does not happen from within the
TeX engine, but by code written in LaTeX macros that explicitly reads
and interprets an EPS file for getting at the bounding box comment.).

> Basically, I am interested to know how exactly LaTex
> and pdflatex are handling graphics. You mentioned in
> your previous mail that LaTex reads the bounding box
> information (that is what I understood) of
> graphics.eps. What about pdflatex when we use for
> example a  graphics.jpg?

It reads the JPEG file itself.

> > > For example, if one want to include a scanned image in his tex
> > > file, most of the time there will be a loss of resolution on
> > > conversion of scanned images (usually jpeg or tiff) to eps.
> > 
> > Only of you are using the wrong programs for conversion.
> 
> I was using tiff2ps for the conversion. But I felt (on screen when
> viewd using gv) that the resolution is lower for ps than tiff
> (viewed using gimp)

That is probably because when using the gimp, you have one hicolor
pixel on screen per tiff pixel.  When using gv, the resolutions
likely differ and gv does dithering to accomodate for that.  Try
printing out your files: the results would be more relevant than the
screen previews.  Ghostview is pretty notorious for ugly images,
anyway.  I don't quite know what it does to achieve that, but the
printouts tend to be better.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de