You see images on screens, on papers, on advertisement boards, and whatnot. But how do you think it got there? Who designed or created the images, what software and formats were used, and what happens if you expand the image?
In this article, we are going to be focussing on all the different types of image file formats and how they are different from one another. We are also going to look into the details of the common image file types and where they are normally used, so you know which formats to use under which circumstances.
This Page Covers
There are two main types of image files: Raster and Vector image files.
Raster vs. Vector Images
What is a Raster Image File?
A raster or a vector image file is defined by how the image inside is put together. A raster image file is a pixel-based graphics file, which means that there are millions of tiny dots in different colors that make up the entire graphic.
The greater the number of pixels a graphic has, the greater its resolution, hence a good quality. However, one caveat of a raster image file is that it is resolution dependent, which essentially means that it originally exists only in one size.
Of course, like any image, a raster image can be expanded or shrunk. However, it will greatly impact the quality of the image as it may become pixelated – the tiny pixels are not able to change their size, but only the area of the pixels with the same color is increased (expanded) or decreased (shrunken).
Although raster images can be used for just about any type of image, such as logos, web images, photographs, etc. But as best practice, they are not used for images that could need to be resized. Therefore, raster images are typically used for digital artwork, web-based content (social media, email graphics, ad banners), and photographs.
That said, a raster image file can be either lossy or lossless and can be saved in different color models. These concepts are discussed further in this post.
Here are some examples of the raster image file formats:
What is a Vector Image File?
A vector image file is not based on pixels. Rather, it is based on complex mathematical equations that define the lines and the curves inside an image. Each equation can be assigned a color, thickness, or stroke effect Tother, a multitude of equations construct a vector image file.
Since a vector image is based on equations, it is resolution independent. Meaning, if you expand or shrink the original image, the resolution of the image will remain the same, hence it won’t affect its quality. Therefore, no details are lost during the resizing of vector images.
That said, vector images are typically used for logos, icons, digital illustrations, etc.; the things that could need to be resized and adjusted according to the different requirements.
Here are some examples of vector image file formats:
- SVG
- AI
- VSDX
- CDR
- DRW
- XAR
- PAT
Unlike a raster image file, vector files are neither lossy nor lossless – because there is no data loss.
Lossy vs. Lossless Raster Image Files
As mentioned above, vector image files are neither lossy nor lossless; only raster image files are.
A raster image file may be lossy or lossless depending on how the file format handles the original data. If all original image data is preserved, then it is a “lossless” raster image file. This also includes the image file formats that compress the original image data that is duplicated or redundant, and recreate it when required.
However, if the file formatting eliminates certain image data while reducing the file size, it compromises the image’s quality and is hence a “lossy” raster image file.
Apart from the lossy and lossless characteristics of the raster image files, another property of the same file types is its color models.
CMYK vs. RGB Raster Images
As we have already mentioned; the colors of the vector image files can be defined for each equation. However, a raster image file can be saved having either one of the two primary color models: CMYK or RGB.
CMYK
CMYK stands for “Cyan, Magenta, Yellow, Key.” These are the primary colors that define the color code for all the colors inside the color spectrum, where “key” is the color black. All other colors are made from a combination of these 4 primary colors.
CMYK image files are ideal for graphics that end up being in print.
RGB
Raster files saved with the RGB color model, which stands for “Red, Green, Blue,” are perfect for images that are t be displayed on a screen. This includes web graphics, digital images, videos, etc.
As with CMYK, red, green, and blue are the primary 3 colors used in this particular color model to create all the other colors.
Now that you know everything there is to know about image file formats and their types, let us take a closer look at individual file formats.
All Image File Formats
Bitmap (BMP)
File Type: Raster, lossless, RGB only
A BMP image file is also referred to as a “bitmap image file,” “device-independent bitmap (DIB) image,” and “bitmap image.” As the name suggests, it is a device-independent image, which means that it can be transferred between different devices and have no effect on the image.
However, being a lossless raster image file, a BMP image file can lose its quality as it is based on many little pixels.
CR2
File Type: Raster, lossless, RGB only
The CR2 file format is a raw image based on the TIFF file format. Some Canon digital cameras, such as the EOS 1D Mark IV, 350D, or 20D, create these. CR2 files that contain uncompressed, raw data with high quality and are typically used by professional photographers.
This format has now been superseded by the CR3 format, which is an iteration of the CR2 format. However, CR2 is still being used today by photographers who have cameras still using this format to capture images.
Windows Cursor (CUR)
File Type: Raster
A CUR file contains an image or a small animation that you see for the Windows mouse pointer. Typically, it is a white arrow with a black border, but can be changed to a variety of different static images from the Windows settings, or even tiny animations such as a spinning hourglass, a spinning circle for loading, etc.
The .CUR files are installed by default with the Windows operating system, but you can create custom CUR files and replace your mouse cursor with custom ones.
DirectDraw Surface (DDS)
File Type: Raster, lossy, RGB only
DDS is primarily meant for images that are directly usable by the GPU. It was created by Microsoft for storing data compressed with S3 Texture Compression (S3TC). Initially, it was designed to be used with DirectX SDK for the development of real-time graphics rendering applications stored as a compressed file, which was then decompressed in the hardware by the Graphical Processing Unit (GPU).
A DDS file has a container format, which means it can store various types of data. However, it is mostly used to store texture data. The S3TC is a lossy compression algorithm, therefore a .DDS file may lose some of its quality between compression and decompression.
OpenEXR (EXR)
File Type: Raster, lossy and lossless, RGB only
A file having the .EXR extension is a High Dynamic-Range (HDR) raster image file that supports multi-layer images, supports 16-bit and 32-bit pixels and supports both lossy and lossless compression. These files are used to store high-quality images which can then be used by photo editing and visual effects software.
The OpenEXR Image format was first released to the public in 2003 as an open-source format. It has since then received several iterations in an attempt to make it better.
GIF
File Type: Raster, lossless, RGB only
A GIF file has been around for some time but has gained more popularity over the last decade. Originally, GIF was a lossless image file format used to store data with a maximum of 256 colors. Then came the Animated GIFs which are tiny animations. The GIF format is mostly used by websites for buttons and other tiny animations but is not suited to store digital images due to its limitations.
Unlike a .JPG file, a GIF file supports transparency but can either be 100 percent opaque or 100 percent transparent – no in-betweens. In comparison, you can manage the level of transparency in a PNG file.
HDR
File Type: Raster, lossless, RGB only
A .HDR file is a raster-based file, but it is generated from pixels. These are usually generated from digital images captures from cameras. HDR stands for High-Dynamic Range, which means that the image quality is excellent.
An HDR image can be used to enhance the colors and brightness of an image through image-editing software. Images are not usually saved in HDR, but only used to edit them using software, and then change their type, such as .TIFF.
Additionally, Geographic Information System (GIS) files that contain information on the format and layout of an ESRI BIL file (.BIL) are called ESRI BIL Header files, which are also saved using the .HDR file extension. However, the information stored in these files is in ASCII format.
High-Efficiency Image Format (HEIC/HEIF)
File Type: Raster, lossy, RGB only
The HEIF is a container-format image file based on the High-Efficiency Video Compression (HEVC) codec, also known as H.265, alongside the metadata for the image. It stores an image while reducing the size of the file and maintaining the quality of the image.
Like the .HDR image file format, the HEIF format also uses pixel mapping to create the HEIF file.
Although this format was introduced first for Apple’s iOS 11, they did not create it. That said, Apple’s devices with iOS 11 and higher save images in HEIF format since they take up less space while keeping a high-quality image.
The HEIC files store one or more images in the HEIF format along with the metadata for each image.
Windows Icon (ICO)
File Type: Raster
An ICO file contains the images used by Windows icons. They represent a file, folder, or Windows application or program. These are usually stored in different sizes to match the different settings of the DPI scale.
Older ICO files included images up to 48×48 pixels, but the newer ICO sizes can range from 16×16 to 256×256 pixels.
The color depth of an ICO file can be less than or “equal to and more than” 32 bits. Images less than 32 bits of color store 2 bitmaps: the AND bitmap and the XOR bitmap, whereas the images equal to or more than 32 bits of color are 24-bit images with 8-bit channels for alpha compositing purposes.
JPEG 2000 (JP2)
File Type: Raster, lossy & lossless, RGB and CMY
A .JP2 file is a bitmap image or a raster image file which is an improvement to the JPEG format. The JPEG format is based on the Discrete Cosine Transform (DCT), whereas the JP2 format is based on the wavelet compression algorithm. The JP2 file supports any color depth alongside the metadata for the image.
It is mostly used to store medical images, such as CT and MRI scans, since the compression ratio is much better than the other imaging formats, saving space on the storage drive.
JPEG File Interchange Format (JFIF)
File Type: Raster, lossy, RGB only
A JFIF image file is a raster image file that stores bitmap data in a container format encoded with the JPEG algorithm. Like the JP2 format, the JFIF is also an improvement to the JPEG images. JPEG misses out on some information included in JFIF files, like standard header, resolution, aspect ratio, etc.
JFIF files can be stored with .jfif, .jpg, or .jpeg extensions and support 24-bit color resolution. JFIF is also capable of supporting different levels of compression, allowing users to save images at a lower resolution if required.
JPE
File Type: Raster, lossy, RGB only
A JPE file is basically a JPEG or JPG file, with the same content and everything. Basically, JPE is just an abbreviation for JPG/JPEG and can be converted from one file extension to another simply by renaming the extension.
A .JPE file is a 24-bit compressed JPEG format, usually used for images with lots of different colors. The JPEG file format uses a lossy compression algorithm, saving some space on your storage drive but compromising the quality of the original image.
That said, some digital cameras save 2 copies of the same image: one as JPE in low resolution, and the other as JPG in a higher resolution, so both could be used by the photographer as needed. However, some applications that do recognize the JPEG format do not recognize the JPE format.
JPG/JPEG
File Type: Raster, lossy, RGB only
A JPG file is the same as a JPEG file, which is a raster image file. The file extension can be both .JPG and .JPEG, where either can be renamed into the other for conversion.
JPEGs are used to store digital images and are supported across platforms. Some preinstalled programs within different operating systems also support this format natively. JPEG is a lossy compression algorithm that can significantly shrink the size of an image file, saving space on your storage device.
JPG images can be shared easily over the internet with less bandwidth consumption. Moreover, they can also be used on websites and web servers as the quality degradation due to lossy conversion is almost negligible and can usually not be spotted by the naked eye.
JPEG Stereoscopic (JPS)
File Type: Raster, lossless, RGB only
A JPS file is a stereoscopic JPEG image file, which basically means that it stores 2 variations of the same 2D image, which ultimately results in a 3D image for the viewer (when viewing it in a specific way).
The 2 different images have slight variations in color or perspective encoded side-by-side, one for the left eye and the other for the right eye, which can turn a 2D image into a 3D illusion. Of course, the person viewing the image needs to see it using either 3D glasses, using a cross-eye stare, or the JPS image is first rendered using 3D image rendering software.
MNG
File Type: Raster
The MNG file format stores multiple PNG files to create an animation effect with the support of multi-level transparency. The developers published this file type back in 2001 but did not want to use the same PNG file extension for the animations as well, therefore introducing a dedicated extension for PNG animations: .MNG.
An MNG file is very much like a .GIF file, but with better higher compression ratios. This means that you can save more space on your storage device as compared to a GIF file.
NEF
File Type: Raster, lossless, RGB only
A NEF file is created by the Nikon digital SLR cameras and saved as it was captured in an uncompressed format. The NEF file also contains metadata about the image, including information about the camera and the lens that was used to capture it.
NEF files support 12-bit or 14-bit data, depending on what camera was used. These images can be used in image-editing software to adjust them. Any changes made to the images are then stored in a separate file within the NEF file as an instruction set, which means that the image can be restored to an earlier state if and when required.
ORF
File Type: Raster, lossless, RGB only
ORF files contain high-quality and uncompressed images captured from Olympus digital cameras. They are created by Olympus cameras only exactly as captured.
ORF files also contain metadata about the images, such as color, saturation, temperature data, and contrast, as well as the data about the camera that was used to capture the image.
Since ORF files are not compressed, they can take up a significant amount of storage, unlike other compressed imaging formats like JPEG and TIFF. .ORF files can be used by image-editing software to modify them since they store more image data.
PAM
File Type: Raster, lossless, RGB only
The PAM format is an extension of the Portable Any Map (PNM) format and is a 2D bitmap image that stores uncompressed pixel map data for black and white, RGB, and grayscale images.
This file format is primarily used in UNIX-based operating systems. Although the image data in a .PAM file is in binary, the header begins with several lines of data in ASCII plain text.
Portable Bitmap (PBM)
File Type: Raster
A PBM file contains black-and-white image data represented as binary “1s” and “0s.” It is a raster image file in plain text format where each black pixel is represented by a 1 and each white pixel is represented by a 0. Since it is an open-source file, it has no developers nor any standard format.
PCD
File Type: Raster, lossy and lossless, RGB only
A PCD file contains a digital image of an actual photograph captured by Kodak’s hardware. It can store up to 6 same images in different resolutions so that they can later be used by professionals for editing purposes. The smallest image size is 192×128 pixels whereas the biggest one can be up to 6144×4096 pixels if Pro Photo CD images are used.
PCD images scanned with Kodak’s hardware are usually scanned at a resolution of 3072×2048 pixels and support 24-bit colors. The PCD file format is Kodak’s proprietary Photo CD format used to store digital copies of pictures on Compact Discs (CDs).
Picture Exchange (PCX)
File Type: Raster, lossless, RGB only
The PCX file can contain 1-bit black and white images, 8-bit grayscale images, or 24-bit colored images, compressed using RLE encoding.
At one point in time, the PCX file format was used as the default bitmap image format on the DOS/Windows operating system. However, the format has become (almost) obsolete and replaced with newer, modern imaging formats.
Portable FloatMap (PFM)
File Type: Raster, RGB only
A PFM file defines how the font should appear on a Windows operating system, created by Adobe, and belongs to the “Adobe Type 1” font category. This file is usually accompanied by a PFB file for the font since it does not contain the actual font glyphs.
A PFM file is a binary version of the AFM format. A .PFM file is portable, which means it can be transferred from one place to another simply by copy-pasting. Of course, you would also need the associated .PFB file to move the entire font from one place to another.
PES
File Type: Raster, lossless
A PES file contains instructions and other commands, such as “trim,” “stop,” and “jump,” to be used for different embroidery machines using computer-aided manufacturing. It also contains other information such as the design pattern, colors, density, and length.
This file format is quite popular within the embroidery industry as it can be used by machines from different vendors. Different third-party software also store PES files while saving digital designs. These files can then be fed to the machines to print and design on a real piece of fabric.
The file is also portable, and thus can be shared easily online, or moved onto a USB drive and inserted directly into a sewing machine.
PGM
File Type: Raster
A PGM file contains a grayscale image that can either be stored in ASCII text format or have a binary representation. These are usually encoded with one or two bytes (8 or 16 bits) per pixel. A .PGM file can also contain other information like header information and grid numbers that are representing the different shades of gray.
The information inside the header defines what the PGM format type is. It is “P2” for text and “P5” for binary. It also states other information, such as the image’s width and height. Moreover, binary PGM files can contain multiple images, but ASCII PGM files may only include one image.
Personal Icon (PICON)
File Type: Raster
A PICON file is an icon file that has been customized for a specific purpose. A PICON file is often used for web applications since they are custom-made and small in size, saving significant space on your online server.
However, there aren’t many applications that can be used to open and edit these files.
PNM
File Type: Raster
A PNM file stores a bitmap image using either binary data or plain ASCII text. It was designed to store different types of portable colors, grayscale, and monochrome images. Optionally, a PNM file may also contain raster graphic data in .PBM, .PGM, or .PPM format.
.PNM files only have a single image file inside them and do not use any compression algorithm.
PPM
File Type: Raster
The PPM format stores an image in plain text format using 24-bit numbers, ranging from 0 to 65536, which signifies the color of a pixel. Within a PPM file, you will also find other information such as the dimensions of the image, whitespace data, and the maximum color value.
The PPM file is becoming obsolete as it uses an inefficient format and uses no compression algorithm to reduce the size of the file.
Adobe Photoshop Document (PSD)
File Type: Raster, RGB & CMYK
The PSD format is used by images designed for Adobe Photoshop – a professional image-editing software. Images created using the software are stored in the PSD format, and the software can open a .PSD file too. However, the image size must not increase 30,000 pixels or 2 GBs, else it will need to be saved as a .PSB file.
A single PSD file can store different components for the image, such as image layers, adjustment layers, layer masks, annotations, file information, keywords, and any other elements added by the Photoshop software. The PSD format supports RGB, CMYK, monochrome, grayscale, duotone, indexed color, Lab color, and multichannel color modes, which makes it one of the most advanced formats for editing images.
However, since the size of the PSD files is significantly larger than the standard image files, they are often converted to other formats like JPEG or PNG so that they could be shared or uploaded.
RAF
File Type: Raster, lossless, RGB only
An RAF file is a RAW image format proprietary to specific Fuji digital cameras, such as the FinePix models. RAF files are uncompressed and may also contain a .JPG version of the same image for thumbnail preview purposes.
These files are created by default by Fuji cameras ad can be used with different software for editing purposes. However, since they are uncompressed, they take up significant space on the storage device.
RAS
File Type: Raster, lossless, RGB only
The RAS format contains a raster image file which is mainly used on UNIX devices. It supports 1, 8, 24, and 32 bits per pixel, and can either be compressed or uncompressed. If compressed, the RAS file uses the RLE compression algorithm.
RW2
File Type: Raster, lossless, RGB only
The RW2 file format has been created by Panasonic for their line of digital cameras. It contains a raster image captured by the camera lens in its uncompressed state and is based on the TIFF specification.
All LUMIX cameras save the images in the RW2 format. Since the image data is uncompressed, the image quality is higher than some of the compressed imaging formats, therefore taking up significant space on the storage device. The RW2 files are occasionally converted to other forms, like JPEG and PNG, before being shared or uploaded.
SVG
File Type: Vector
The SVG file contains a 2D vector graphic that was created by World Wide Web Consortium (W3C) but published by Adobe Systems in 2001. The details of the image are described in text in XML format, and may also contain other information such as vector shapes, embedded raster graphics, and text.
The SVG file has evolved over time and thus different versions of it are available, like SVG 1.1, SVG Tiny 1.2, and SVG 2.0.
Although the original SVG file is uncompressed, its size can be reduced by converting it to the .SVGZ format, which uses the GZIP algorithm for compression.
For web visuals like logos, pictures, and charts, SVG files are excellent. However, the inability to display high-quality digital photographs is due to the absence of pixels.
TGA
File Type: Raster, lossless, RGB only
The TGA file format was first introduced in 1984 by Truevision, now known as Avid Technology. It is a raster graphic file that supports 8, 16, 24, or 32 bits per pixel at a maximum of 24 bits for RGB colors and an 8-bit alpha channel. This format can be used for different types of images, such as digital images, as well as textures referenced by 3D video games.
Originally, the TGA file only consisted of 2 domains: the “TGA File Header” and the “Image/Color Map Data.” However, in 1989, new portions were added to keep up with the demands of the professionals, which were the “Developer Area,” “Extension Area,” and “TGA File Footer.” Apart from these, several other new extensions were also introduced, each having the purpose to enhance the quality of the original image.
TIF/TIFF
File Type: Raster, lossy or lossless, RGB & CMYK
A TIFF file contains a raster image data container in both text and binary formats using either lossy or lossless compression. It has high-quality images since it supports color depths from 1 to 24 bits and supports multiple layers and pages. It was created by the Aldus Corporation, which was then merged into Adobe Systems.
Although the TIFF format was surpassed by the JPEG format, it is still used today by professionals for editing and printing purposes.
A TIFF file can be saved as .TIFF or .TIF.
WBMP
File Type: Raster
The WBMP file is very much similar to a .BMP file but only supports monochrome (1-bit) image data. It is a black-and-white bitmap image used by mobile devices for wireless transfers between phones and PDAs, usually transmitted using the SMS messaging protocol.
However, since the technology is advancing rapidly, the WBMP format is becoming obsolete as it is being replaced by full-color images and video formats.
WEBP
File Type: Raster, lossy and lossless, RGB only
The WEBP format contains a raster image file which is compressed significantly better than some other compressed imaging formats, such as JPEG, etc., and maintains the quality of the image. It was acquired by Google from On2 Technologies for web graphics to improve upon other image formats like JPEG, PNG, GIF, etc.
A year after it was released in 2009, Google improved the original format to support new features like animations, transparency, and metadata, while using the same .WEBP file extension.
X3F
File Type: Raster
The .X3F files are created by SIGMA digital cameras to store high-end RAW images captured by the Foveon X3 camera sensors. An X3F file contains data for a single image, along with other content such as its metadata, thumbnail, and preview image.
Since these files are uncompressed, they can take up a significant amount of storage space.
Experimental Computing Facility (XCF)
File Type: Raster, lossless
The XCF imaging format is the native format of the GIMP image editing software, which includes other information about the image, such as its layers, paths, channels, guides, etc.
The XCF format is backward compatible, which means it can work with older GIMP versions. Not only that, but it is also forward-compatible in some cases.
Closing Words
This article lists all the common image file formats that have been available over the years. However, the list does not end here. There are still many formats missing from this list, which mostly belong to standalone applications and software. Those are proprietarily created by software manufacturers for their own benefit.
In this post, you have learned about the different types and properties of image file formats, and thus, know which one to use under the correct conditions and circumstances.