Add tif image to LaTeX

No LaTeX engine can read .tif files directly: you will have to convert to another format (more on the graphics formats recognised by TeX is in Which graphics formats can be included in documents processed by latex or pdflatex?). Probably the easiest route is to use pdfLaTeX with the graphics converted to .png format. This conversion is lossless and therefore the images will be identical.

You can do this by hand, but it is also possible to set up to do the job automatically. The method is discussed in Using macros in \DeclareGraphicsRule statement using shell command: the basic requirement is something like

\def\eattif#1.tif{#1}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 \eattif#1-tif-converted-to.png }
\AppendGraphicsExtensions{.tif}

in your preamble to enable the conversion. This requires that the convert program is available and needs shell escape enabled.

You can use a perhaps clearer syntax by loading the package epstopdf:

\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.tif}{png}{.png}{convert #1 \OutputFile}
\AppendGraphicsExtensions{.tif}

can substitute the three lines of code above.


This is an old question, but since it's very popular, I'm going to add my share of information to it.

As all other answers says, you have to convert the tiff to some supported format by LaTeX. All other answers suggest to convert to png, but I think that it is best to convert directly to pdf.

There are many reasons for this, because tiff is a container format that has many common features with pdf:

  • it supports different color spaces, and so if the original image is in ymck for example, you don't have to convert it to rgb (which is the case with png);
  • it has different king of compressions, most of which are supported by PDF, and so if the original image is black and white scan compressed with ccitt, you don't have to convert it to ten times bigger png;
  • it support vector clipping paths that can be preserved in the pdf.

For all these reasons, I think that is better to use something like tiff2pdf in place of convert to png.

Tags:

Graphics

Tiff