Overview
Image file formats fall into two basic camps, vector and raster. Vector formats are things such as SVG (Inkscape/Firefox), EPS, AI (Adobe Illustrator) and so on. Raster formats are things like BMP, JPG, PNG or GIF. In a vector format pictures are composed of lines and curves which are described by mathematical equations (e.g. Bézier curves). In a raster format pictures are composed of a matrix of pixels that have values at each element of the matrix (you could think of a 100x100 pixel RGB image as 3-d matrix with dimensions 100x100x3).
Vector formats have the advantage that they can be scaled to any size you want. Since they are merely a description of lines and shapes, they can be resized and then rasterized at that new size. Raster formats are described by the pixes that they contain so the size that a raster image appears depends on the dpi of the device on which it is rendered. If we have a 100x100 pixel JPG and print it out at 300dpi it will be (roughly) 1/3 inch square in size. As another example, my monitor is about 18.75 inches wide and there are 1920 pixels in that space, this means my monitor has about 100dpi and that same 100x100 image will appear to be about 1 inch on a side.
When to Use
I need to represent... |
Use this image format |
Full-color images, photographs, very detailed graphical logos; scaling is unimportant |
JPG |
Icons, simple logos, line art with large areas of flat color; scaling is unimportant |
PNG |
Pages of text, little or no graphics |
PDF, PS, Gzipped PS |
Pages of text, graphics |
|
Graphical logos, line drawings; scaling important |
EPS, PDF*, SVG |
* Be sure that this is native PDF. PDF is a container format and can have arbitrary data embedded in it. If you're just embedding a JPG in a PDF and then including that PDF file in another PDF, this is still the same as a JPG. To make the conversion, you'll have to convert from a raster image to a vector image. This process is called vectorization and is the opposite of rasterization. You can use Potrace, or Inkscape to do this.