Menu

File Formats

Contents

  1. File Formats and Extensions
  2. Pixel Dimensions
  3. DPI and PPI
  4. Raster and Vector Images
  5. Raster Image Formats
  6. Vector and Animation Formats
  7. Sample Rate and Bit Depth
  8. Audio File Formats
  9. Frame Rate
  10. Video Resolution Standards
  11. Video File Formats
  12. Choosing platforms, media and file formats

1. File Formats and Extensions

A file format is the way data is stored inside a file. Two files might hold the same song or picture but arrange the data completely differently, and each arrangement is a different format. The file extension is the short tag at the end of a file name, after the full stop, which shows which format that file uses.

Extensions exist so software can recognise a file without having to guess. When you double-click match_highlights.mp4 your computer reads mp4 and hands the file to a video player; open shopping_list.txt instead and a text editor launches. The extension is only a label that points to the format — it does not hold the content itself.

Reading an extension

Extensions are usually three or four letters, often lower case: .png, .mp3, .docx. A file name can contain more than one full stop, so software always looks at the part after the last one. In trip.2025.jpg the format is jpg, and the earlier full stop is just part of the name. Some formats also use a longer version, such as .jpeg or .mpeg, which the same software still recognises.

When the label is wrong

Renaming a file does not convert it. Change cookbook.docx to cookbook.pdf and the computer will happily try to open it as a PDF, but the data inside is still in DOCX, so the file either refuses to open or appears scrambled. That is why the extension must always match the format the file was actually saved in — a correct match is what gets the right software to open it.

filename = "book_report.docx"
extension = filename.rsplit(".", 1)[1]

opening_software = {"docx": "word processor", "png": "image viewer", "mp3": "music player"}
print("Extension:", extension)
print("Open with:", opening_software.get(extension, "app not found"))

Output:

Extension: docx
Open with: word processor

2. Pixel Dimensions

Raster (bitmap) images, such as photographs, are made from a grid of tiny squares called pixels. Pixel dimensions are the number of pixels across the width and the number down the height of an image, written as width × height.

A photo of a school football team saved at 2400 × 1600 contains 3,840,000 pixels. Crop the same photo to 240 × 160 and it contains 38,400 pixels — one hundredth of the pixels.

More pixels allow an image to hold finer detail. Thin lines stay crisp, curved edges look smooth and small text remains readable. If you show two versions of a picture at the same size on a screen or on paper, the one with higher pixel dimensions packs more pixels into the same space, so each pixel is smaller and the picture looks sharper.

With too few pixels, the image has to be enlarged to fill the space. Each pixel becomes a visible block and the edges look jagged or blocky, which is called pixelated. For a given use — such as a large printed photo or a small on-screen picture — higher pixel dimensions generally give higher image quality, provided the extra pixels are actually needed at that size.

A huge pixel count mainly helps when the picture will be viewed large or zoomed in. A tiny thumbnail does not reveal the benefit of millions of extra pixels. Pixel dimensions also do not guarantee a good picture on their own: a blurry or badly lit photo stays blurry even at a high pixel count.

3. DPI and PPI

DPI (dots per inch) and PPI (pixels per inch) both measure resolution: how many dots or pixels are packed into one inch of an image. A higher number means more detail in each inch, so the image looks sharper.

Print and screen

DPI is used for print resolution. It counts the dots of ink a printer places in one inch of paper. PPI is used for screen resolution. It counts the pixels shown in one inch of a display. People sometimes say DPI when they mean PPI on a screen, but the correct term there is PPI.

MeasurementUsed forCounts
DPIPrintDots of ink per inch
PPIScreensPixels per inch

Quality

A higher resolution gives more detail and higher image quality. At a lower resolution, there are fewer dots or pixels in each inch, so edges and fine detail can look blurred or pixelated. For example, a printed photo at 600 DPI can show the fine fur on a pet, while the same photo at 60 DPI may look soft and blocky.

Resolution and pixel dimensions

Pixel dimensions are the number of pixels across and down an image, such as 2400 wide by 1600 high. Resolution is a separate property: the same 2400 by 1600 image can be set to 250 PPI or 500 PPI. At 250 PPI it is displayed or printed larger, with fewer pixels in each inch; at 500 PPI it is smaller, with more pixels in each inch, so detail looks finer. Changing the PPI setting does not add pixels — it changes how tightly they are packed.

4. Raster and Vector Images

Digital images are stored in one of two ways: as a raster (also called bitmap) image or as a vector image. The difference becomes obvious when you make an image bigger.

Raster images

A raster image is made from a grid of pixels — tiny squares, each holding one colour. The image is just that grid, so its quality depends on how many pixels are in it. If you zoom in far enough, you see the individual squares. If you enlarge the image, the software stretches the pixels it already has and guesses the gaps, so edges turn jagged and blocky. This is pixelation.

For example, a photo of a school netball team taken at a small size looks fine on a phone. Blown up to cover a sports hall banner, the players' faces become a patchwork of coloured squares. Raster images suit photographs, where every pixel may be a slightly different shade.

Vector images

A vector image is not a grid of pixels. It is made from lines, curves and fills, stored as instructions: draw a curve from here to there, fill this shape with blue. When the image is enlarged, the instructions are used to redraw it at the new size, so the edges stay crisp. A vector logo on a small membership card can be scaled up for a large shop sign with no loss of quality.

Vector images suit logos, icons and diagrams built from clean shapes. A vector image is not automatically better quality — a simple drawing is still simple — but scaling it does not cause pixelation.

Comparing raster and vector

FeatureRaster (bitmap)Vector
Made fromA grid of pixelsLines, curves and fills
When enlargedPixels stretch; edges pixelateRedrawn sharply; no pixelation
Typical usePhotographsLogos and diagrams

5. Raster Image Formats

Raster image formats include JPEG, PNG, GIF, TIFF and RAW. Each format balances file size, quality and features, so the right choice depends on how the image will be used.

FormatCompressionKey feature
JPEGLossySmall files; no transparency
PNGLosslessSupports transparency
TIFFUncompressedKeeps all image data for high-quality printing
RAWUncompressedLarge files from professional cameras, good for editing
GIFHeavily compressedHolds multiple frames for simple animation

JPEG uses lossy compression and gives small files, which is useful for a sports-day photo you attach to an email. It does not support transparency. PNG uses lossless compression and supports transparency, so a cut-out photo of a badminton shuttlecock can sit over a poster for the school club without a pale rectangle behind it.

TIFF is uncompressed and keeps all the image data, making it suitable for high-quality printing, such as a scanned pressed-leaf collection where the faint veins must be kept before it is printed for a nature display. RAW is also uncompressed and is used by professional cameras; files are large, but they are good for editing, letting a photographer brighten a dark photo of an owl. GIF is heavily compressed and can hold multiple frames for simple animation, like a looping arrow on a classroom slide. It is now largely obsolete except for those simple animations.

6. Vector and Animation Formats

Vector image formats store artwork as shapes, lines and curves, so the picture can be made larger or smaller without turning blocky. Two common vector image formats are SVG and EPS.

SVG and EPS

SVG is designed for screens and the web. Because it describes shapes rather than pixels, an SVG file is usually small, and it can be scaled to fit a phone or a large display without loss of quality. SVG can also include animation, such as a shape that moves or changes colour. For example, a museum's online floor plan could use SVG, with a small dot that pulses to show where you are. EPS is another vector format, often used for artwork that will be printed, because a printer can scale it cleanly.

FormatTypeAnimation?Good for
SVGVector imageYesSmall, sharp graphics that scale
EPSVector imageNoPrint-ready artwork
SWFVector animationYesOlder animations; needs a plugin
MP4VideoYesDetailed or photographic animation

SWF and older animations

SWF is a vector animation format, but it needs a plugin to play. Modern browsers no longer support the plugin, so SWF is now uncommon and a poor choice for a new product. An old revision game with a bouncing character saved as SWF may not open on a current laptop.

Storing animation

Animation can be stored in video formats such as MP4, or in vector formats such as SVG. MP4 works well for detailed or photographic animation that needs to play in many places. SVG suits simple animation made from shapes, such as a recipe app where a whisk icon rotates while a timer counts down. The choice depends on the content and where it will be used: MP4 for realistic motion and wide playback, SVG for small, sharp, shape-based animation.

7. Sample Rate and Bit Depth

Sound in the real world is analogue: it travels as a smoothly changing wave. Computers store and process numbers, so analogue audio must be digitised before it can be saved or edited. Digitising means taking measurements of the wave at regular moments in time and storing each measurement as a number.

Sample rate

Sample rate is the number of times sound is sampled each second, measured in hertz (Hz). A sample rate of 48,000 Hz means 48,000 measurements are taken every second. A higher sample rate takes more measurements per second, so the digitised version follows the shape of the original wave more closely. This makes the sound more accurate and improves quality. Imagine recording a friend's drum kit: at a low sample rate, a very quick cymbal hit might fall between samples and be missed. At a higher sample rate, there are more chances to capture it.

Bit depth

Bit depth sets how many bits are kept for every single sample. This decides how many possible levels each sample can be stored at, so it determines the accuracy of each measurement. With 8-bit depth there are 256 levels; with 12-bit depth there are 4,096 levels. More levels mean each sample can be stored closer to its true height, which gives better sound quality, especially for quiet details.

ChangeEffect on sound
Higher sample rateMore samples per second; wave is followed more closely, so quality improves.
Higher bit depthMore possible levels per sample; each sample is more accurate, so quality improves.

Sample rate and bit depth are different properties: sample rate is how often you measure the wave, while bit depth is how precisely each measurement is recorded.

8. Audio File Formats

Audio file formats are the different ways digital sound is saved, such as WAV, MP3, AAC, FLAC and Ogg. The format you choose changes two things: how much of the original sound is kept, and how much storage the file needs.

Formats that keep all the sound

WAV is normally uncompressed. It stores every sample exactly as it was recorded, so it gives the highest quality, but the files are very large. A three-minute WAV of the school orchestra rehearsal takes up more than 30 MB, so a whole concert would use a big slice of a phone's storage, and the file takes a long time to send over the internet.

FLAC is lossless compressed: it packs the same sound into a smaller file without throwing anything away, so the quality matches WAV. FLAC is open source, so it does not require licence fees and app developers can add support without paying. However, not all players support it, so a FLAC track you send to a friend might not open on their device.

Lossy formats

MP3 is lossy compressed: it permanently removes the parts of the sound people are least likely to notice. The file becomes small and nearly every device will play it, but some quality is lost.

AAC is a lossy compressed format, and at the same file size it gives better sound quality than MP3. The drawback is that not all players support it, so check compatibility before you distribute a file.

Ogg is a lossy compressed format too, so files stay small, but fewer devices and programs can play it than MP3.

FormatCompressionQualityFile sizeSupport
WAVNoneHighestLargestVery wide
FLACLosslessSame as WAVSmaller than WAVLimited
MP3LossySome detail lostSmallVery wide
AACLossyBetter than MP3 at the same sizeSmallLimited
OggLossySome detail lostSmallLimited

9. Frame Rate

Frame rate describes how many individual still images are displayed in each second of a moving image. Each frame is a single still picture, and playing many of them quickly one after another creates the illusion of movement. Frame rate is measured in frames per second (fps).

What the numbers mean

A clip at 30 fps shows 30 separate pictures every second. Raise it to 60 fps and you show 60, so each second is split into twice as many moments. Because every frame stays on screen for less time, a moving subject is caught in smaller steps from one frame to the next.

For example, a pupil waving at the camera at 15 fps might see their hand jump to a new position between frames, so the wave looks jerky. Film the same wave at 60 fps and the gaps between positions are tiny, so the hand moves smoothly.

Smoother motion

Higher frame rates produce smoother motion. The extra frames fill in the movement, so your eye sees a continuous flow rather than a series of separate pictures. A low frame rate can make quick movement look jerky, and a fast object may seem to jump from place to place rather than glide across the screen.

Fast movement needs more frames

When things move quickly, a fast frame rate matters more. A clip of a bee darting between foxgloves, a dog shaking water from its coat or a chef tossing a pancake in a pan all change position a lot from moment to moment. Plenty of frames each second keeps that action smooth instead of choppy, and helps you spot the detail of what happened. Fast frame rates are important for fast-moving content, because there is more change to capture between frames.

Frame rate is not the same as resolution. Resolution is about the number of pixels in each frame, while frame rate describes how many frames you see every second.

10. Video Resolution Standards

Resolution describes how much detail a video frame can hold, based on the number of pixels across and down. Comparing frames by their resolution standards helps you judge and compare video quality.

SD, HD and UHD

SD (standard definition) is a lower resolution video format, so the picture can look softer and less detailed. HD (high definition) has a higher resolution than SD and comes in more than one level, such as 720p and 1080p; the number is close to the number of pixel rows down the frame. A higher HD level has more pixels than a lower one, so it can show finer detail.

UHD (ultra high definition) is a higher resolution than HD, and the UHD family is split into two tiers, 4K and 8K.

StandardWhat it means
SDLower than HD, so the picture is softer and less detailed
HDHigher than SD, in levels such as 720p and 1080p
4K (UHD)About 4,000 pixels wide, roughly four times the pixels of HD
8K (UHD)About 8,000 pixels wide, with the densest grid and the highest quality here

Why it matters

Higher video resolution significantly improves picture quality because more pixels can show finer detail, cleaner edges and more realistic textures. For example, a clip of a busy market filmed in SD can look blocky on a large screen, in HD the signs on each stall are easy to read, and in 4K you can pick out individual price tags.

11. Video File Formats

A video file format is the way the frames and sound of a moving image are stored in a file. Formats store or compress video in different ways, which affects file size, quality and whether a device can play the video.

Common video formats and compression standards include MP4, AVI, MOV, WMV, MPEG-2 and H.264.

FormatCompressionTypical use
MP4Usually lossy compressedVery common for streaming and sharing; balances good quality with a small file size
AVICan be uncompressed or compressedUncompressed AVI keeps every frame's data for high-quality editing, so files are very large
MOVUsually compressedA flexible container that can hold several audio and video tracks; playback is well supported on many devices
WMVCompressedOnce common on some computers, but less common now; older files may need extra software

MPEG-2 is an older compressed standard still used for some broadcast and disc video. H.264 is a compression method often used inside MP4 files.

Compressed or uncompressed?

Uncompressed video preserves all the original data and gives the highest quality, but the files are very large. A short clip can take up more storage than a whole folder of photos. Compressed video reduces the file size by storing less data. The more compression applied, the more likely you are to see digital artefacts — blocky, smeared or fuzzy patches, especially around fast movement or sharp edges.

For example, a youth theatre group recording its summer show might export an MP4 for its website so parents can watch on a phone without a long wait. It keeps an uncompressed copy until the final edit is agreed, so every cut is made from complete data.

Compatibility matters

A format is only useful if the audience's device can open it. Less common formats may have compatibility issues: a video saved in a rare format might not play on a phone, tablet or smart TV, so the audience sees nothing at all. Checking support before distributing a video avoids this problem.

12. Choosing platforms, media and file formats

Choosing a platform or a medium is a decision about how a product reaches its audience. It depends on the audience, where and how the product will be used, portability, screen size, internet availability, cost, capacity and the quality needed. A product for people on the move needs a portable platform; high-definition video needs a medium with room to hold it.

Choosing the medium

MediumCapacitySuits
CDabout 700 MBaudio, such as an album
DVDabout 4.7 GBstandard-definition video
Blu-rayabout 25 GB or morehigh-definition video
Flash memorymany gigabytes on a stick or cardlarge files handed over where there is no internet

Capacity and quality drive the choice: a CD holds about 700 MB, enough for an album, while high-definition video needs the space of a Blu-ray. DVDs and Blu-rays are the same physical size; the difference is how much they hold and the video quality they can carry.

How the platform shapes the file format

The device and its operating system must be able to open and play the file, so the platform's characteristics decide the format. Storage matters: a phone with little space free cannot hold a long, high-quality video. Screen size and resolution matter: a large television can show fine detail that a small phone screen cannot, so it needs the sharper version. The internet connection matters too: a slow or capped connection needs a smaller file that will not stall or swallow a data allowance.

A bike-repair charity films short how-to videos. Most of its viewers use older phones on limited data, so it exports smaller, lower-resolution files that play smoothly; for volunteers with no internet it puts the full-quality files on a memory stick.

Checking compatibility

Compatibility is checked before distribution by trying the finished file on the target platform to be sure it opens and plays. A file in a format the platform cannot open will never reach the audience, however good it is, so platform, medium and format must fit together.

File Formats exam questions20 questions with mark schemes and example answers