A Guide to Image File Formats (And When to Use Them)

By Author thumbnail image Team DocFly | on

Have you ever wondered what the difference between a JPG or a PNG file is? What about a TIFF or a GIF? If you're a little confused about the different image file formats, you're not alone. Unless you use images regularly, it's probably not obvious what the differences are or why you would choose one format over another. But not to worry! In this guide, we break down the different image file types for you, including what they're for and the best places to use them.

painting image file formats

Photo credit: Unsplash/Alice Dietrich

Image files are everywhere: from photos on travel blogs to designs on t-shirts, everything begins with an image file. But to ensure the best quality and results with your images, it's important to use the right graphics file format for your application. For starters, image files are generally classified into two types: raster and vector. The type that you select depends on your project and where the image will live. Here's an explanation.


Raster vs. vector images

  • Raster images: Raster images (aka bitmap images), are made up of tiny pixels, or dots. The resolution of raster images is expressed in dpi, or dots per inch, e.g., 128 dpi equals 128 pixels per inch. The higher the dpi, the higher the resolution of the image. The thing to understand is that raster images have a set number of pixels. This means if you stretch an image out, less dots are available to fill the space, resulting in a blurrier image. JPEG/JPG, GIF, PNG, TIFF, and PSD are all raster images.
  • Vector images: Vector images are made up of lines (also called paths). The lines are built using mathematical formulas that determine the shape, size, and colour of the line. Because they're based on mathematical formulas, not dots, vector images can be resized without a loss of image quality. For example, a vector logo for a business card could be stretched to fill the size of a billboard without losing quality. PDF, EPS, and AI files are vector images.

Now that you know the difference between raster and vector images, here's a closer look at the most widely used image file formats by category.


Raster image file formats (JPEG, RAW, GIF, PNG, TIFF, PSD)

JPEG/JPG (Joint Photographic Experts Group)

JPEG (or JPG) is a popular image file format developed specifically for storing photographic images. JPEGs support image compression, a process which removes non-essential bits from an image, minimising the size of the file in order to save space.

The JPEG  image file format is good for:

  • Digital cameras, where image files can be saved in multiple sizes.
  • Documents and files, including Microsoft and Open Office documents, Powerpoint presentations, and graphs.
  • Websites, where JPEG images files can be resized for faster page loading.

JPEGs store up to 16 million colours, resulting in high-resolution, high-quality images suitable for both printing and the web. However, JPEG's compression algorithm leads to a loss of image quality every time a file is edited and saved. That said, JPEGs are more than sufficient for the vast majority of photos taken today, although some professional photographers prefer RAW.


RAW (Raw Image Formats for cameras)

RAW files contain uncompressed and minimally processed data, capturing exactly what came through a camera's sensor with no loss in image quality. The RAW image format is not a universal format, like JPEG. Rather, RAW files are a specific format specific to a camera, with four different extensions:

  • NEF: Nikon Electronic Format for Nikon cameras.
  • CRW: Canon Raw File Format for Canon cameras.
  • CR2: Canon Raw File Format for Canon cameras (replaces CRW).
  • PEF: Pentax Electronic Format.

Unlike JPEGs, which are easily opened, viewed, and edited by most image editing programmes, RAW is a proprietary format tied to a specific camera model. In order to edit a RAW file, the software must be compatible with the camera that took the image. However, RAW images can be edited and saved as many times as you want with no destruction to the original image.


GIF (Graphics Interchange Format)

A GIF (pronounced "JIFF") file is a special file format used for web animation, such as ad banners, buttons, and marketing animations. A GIF is created by combining several separate images files together in order to create a single file. GIFs can be compressed using an algorithm, but unlike JPEGs, GIF compression doesn't result in a loss of image quality. Although GIFs are ideal for use on the web, they're not good for photographs as they have a limited palette of 256 colours.


PNG (Portable Network Graphics)

The PNG image file format is a type of uncompressed raster image used as an alternative to GIFs. PNGs feature 24-bit RGB colour and the ability to display transparent backgrounds. They're often used in web design as you can create a transparent background with them for logos or other graphics, or to create semi-transparent images. PNGs are useful for web pages, but not for printing as they don't support CMYK colour—a standard in the printing industry.


TIFF (Tagg Image File Format)

The TIFF format is a raster image file type popular among graphic artists and professional photographers, and is a standard in the printing industry. What makes the TIFF format different is that a TIFF file can be compressed or uncompressed, and multiple images can be stored in a single TIFF file. This makes it easier to transport them, although a TIFF can take up significantly more space than a JPEG. TIFF files are not recommended for use on the web.


PSD (Photoshop Document)

The PSD image file format is Adobe's proprietary raster file type that can only be used with Adobe software. A PSD file can only be opened with Adobe Photoshop, Adobe Photoshop Elements, CorelDRAW, and Corel's PaintShop Pro tool. PSD files are unique in that they support single images as well as allowing you to add and layer graphic design elements onto the photo, including: other images, text, colour filters, vector paths, transparency, and much more.


Vector image file formats (PDF, EPS, AI)

PDF (Portable Document Format)

The PDF file format is a powerful, open standard file format created by Adobe and now used around the world. What makes PDFs so universally accepted is that they offer excellent image quality, are highly secure, and can be viewed regardless of the software, hardware, or operating system a person is using.

Besides text and graphics, PDF documents can contain:

  • Links and buttons.
  • Form fields for legal documents.
  • Audio and video for dynamic presentation.
  • Business logic.

PDFs are highly versatile for presenting and sharing information across multiple platforms and devices. And, unlike other types of image file types, PDFs can be signed electronically, easily viewed, and also edited using free, best-in-class online software, such as DocFly.


EPS (Encapsulated Postscript)

An EPS file is a vector image file format used for printing to PostScript printers and imagesetters, and is often used for high resolution printing of illustrations. An EPS file can only be opened by a graphic software programme like Adobe Illustrator or Corel Draw.


AI (Adobe Illustrator Document)

The AI image file format is a proprietary format used by Adobe Illustrator. It's often used by graphic designers, and is considered the industry standard for creating images and artwork from scratch.


When to use PDFs instead of image files

While image files like JPEG and PNG have a wide range of important uses, there may be times when you want to use a PDF file over other types of image file formats.

You should use a PDF when:

  • You require security: Because they can't be changed or altered without leaving a "footprint", they're useful for designers who want to protect their work and for businesses that need to ensure documents can't be altered or copied for legal reasons. In particular, PDFs offer much better security than JPEGs or other image files, and can also be password protected. To learn more about how converting to a PDF can safeguard your important image files, see 3 ways converting a JPG to PDF can protect your images.
  • You don't want a document to change when opened: Using a PDF file ensures that text, images, and other elements will display correctly and accurately regardless of who opens it, and regardless of the device and operating system it's opened on.
  • You want high print quality and convenience: PDFs offer high quality for printed images, such as brochures and marketing materials-- making them the file type of choice for many printing outlets. Images also do not lose quality when converted to PDF, so there's no need to worry about blurring or detail loss.
  • You want to send multiple images files: If images have been converted to PDF, it allows them to be merged into one document. This simplifies the process for sending images to other parties and reduces the risk of attachment overwhelm or missing a file.
  • You want a smaller file size: High resolution images can make for rather hefty files. Using PDFs will prevent issues with going over the attachment size limit or taking up too much space on your drive. If the resulting PDF is still too large, it can even be compressed further without a reduction in quality.


Here's how to quickly convert the following file formats using DocFly:

Working with image files requires some basic knowledge, but it's not difficult to learn. Hopefully the above information helps to demystify the different image file types, helping you choose and use the right formats for your projects going forward.

Want a free, best-in-class tool to manage your PDFs? To learn how DocFly can help you create, edit, and convert your image files and PDFs on the web, please visit our home page.