Under TexWorks XeLaTeX, I try to \includegraphics a .NEF file. I get the error message in the title, except that this includes "(NEF)" for better targetting. Of course, I can convert .NEF to .pdf, .png or other loadable formats. But I have several hundred of these .NEF's, and for final high-quality publication (coffee-table book) I will need that format.
Similar questions have been posed about .tiff images; answers "impossible". Is that still true?
[Tex/LaTex] Unable to load picture or PDF file (NEF)
filesgraphics
Best Answer
There is no way to directly include TIFF files with
pdflatex
. The programpdftex
used to support some TIFF files, but the developers eventually decided against this, because reall supporting TIFF means supporting tens (perhaps hundreds) different formats. So conversion to PNG seems the only alternative.I tested the following after downloading a sample NEF file from http://www.luminescentphoto.com/nx2/nefs.html and making sure the
dcraw
(for GraphicsMagick) orufraw
(for ImageMagick) utilities are available on the machine.The example file is
to be run with
pdflatex -shell-escape
.This will do the conversion on the fly, but just once, producing the file
baby-nef-converted-to.png
.Use one of the two lines above depending on what conversion program you have or prefer.
Some figures: the original NEF file is 18 MiB; conversion with
dcraw
produces a 13 MiB PNG file (8-bit/color); conversion withufraw
produces a 55 MiB PNG file (16-bit/color). Take your pick or adjust the conversion options.