PDFLATEX, when used with graphics
or
graphicx
packages, can compile correctly PNG and JPG files into
the PDF, but is not able to handle EPS files.
Conversely, the process of compiling to DVI and converting to PS and eventually PDF
does support EPS, but does not support PNG and JPG. To overcome this frustrating loop,
in case you want to include both EPS and PNG or JPG files, you have a number of workarounds:
You can convert EPS files to PNG or other formats with utilities as the Gimp, and use PDFLATEX.
You can convert the other way around, and use LATEX and PS-PDF conversion; this is not always a good idea, since EPS encapsulation of JPG or PNG can yield larger files, that in turn yield unnecessarily large documents; this is however highly dependent on the graphic utility that you use, since EPS can encapsulate other graphics, but not all applications support this perfectly; some might actually try to build your JPG image with vectors and various scripting, which will result in gigantic files. A simple program that does this process correctly is jpg2ps.
If you need a file in PS format, but have JPG or PNG graphics, you can also simply use PDFLATEX first, and then use the command-line instruction pdftops, or, better yet, implement your own user tag to do that for you (see the section called “User-Defined Tags”).
Use the right file for the right graphic!
EPS is sort of a graphic vector scripting language, describing all the lines and dots the graph is made of; it looks good even when magnified beyond its default size, and suits best diagrams and vectorial graphic natively produced in EPS, which look very clear and sharp while maintaining a very small byte size.
PNG (or the deprecated GIF) is a non-lossy file format, with good compression and quality. It is very good for diagrams, scans of drawings, or anything whose sharpness you do want to retain. It is sometimes overkill when used for photos.
JPG is a lossy format, that compresses files better than PNG at the price of some loss in the picture detail. This is usually irrelevant for photos, but may cause bad quality for diagrams, drawings, and may make some thin lines disappear outright; in those cases use EPS or PNG.
But always remember: garbage in, garbage out! No conversion will make a bad picture good.