Understanding Images and Their Storage on Disk

Images have become an integral part of our daily lives, from the photos we capture on our smartphones to the graphics that populate the websites we visit. Images can take various forms, from photographs captured by cameras to digital paintings created using graphic design software.

What is an Image?

An image is a visual representation or a visual perception of an object or a scene. In the digital world, images are often created and displayed using pixels - tiny dots that come together to form a picture. Each pixel carries information about color and brightness, collectively creating the visual experience we perceive.

Different file formats, such as JPEG, PNG, WEBP, and more, are used to store these images digitally. But have you ever stopped to wonder what exactly an image is and how these visual representations are stored on our computer disks?

How Are Images Stored on Disk?

When you capture a photo or create a graphic on your computer, it needs a place to be stored. This is where the concept of file storage comes into play. A computer image is a picture composed of an array of elements called pixels.

These arrays of pixels are stored on computer disks as image files, which can be traditional hard disk drives (HDDs) or modern solid-state drives (SSDs). Once the images are stored we can view it later. Image File means an electronic file which is stored in file formats. Similarly when we talk about the internet, stored images are served form the server to the browser and thus we be able to see the images on websites.

Coming back to the point, images are often stored as a collection of pixels, with each pixel representing a tiny, discrete unit of color and brightness. These pixels are arranged in a grid, and the combination of their colors and positions creates the overall visual representation. A pixel represents one color. An image with a resolution of 1024 by 798 pixels has 1024 x 798 pixels (817,152 pixels) in it. So each pixel will have its own color information. But how these pixels are drawn again to reproduce the image?

To understand this, we need to store pixel position information as well as the brightness level.

Technically the information about the image resolution, height/width, color depth focal length, image creator, geo location, the time when photo was produced is called meta data.

This metadata is also stored along the image data. We can further divide this metadata into 2 parts;

  1. Techical Metadata
    • In order for the computer to correctly display the image, the computer needs to know the following things: 
      • Height and width of the image – so each line of the image starts in the correct place.
      • Colour depth – so the correct number of bits are used to represent the colour of each pixel.
      • Resolution – so the image displays at the correct size.
  2. Descriptive metadata
    • All of this extra piece of information metadata of the image. These are the essential metadata parts. But coloured images or image taken by camera may also contain other metadata like;
      • Time – when photo was taken
      • Geo – the place where photo was taken
      • Focal length – camera focal length
      • Image creator – name of the image creator
      • Captions - caption of the image
      • Title - File name

What is the image storage process?

The process of storing an image on disk involves converting the visual information in the image into a format that can be saved and retrieved.

Images are typically captured by digital devices such as cameras or generated digitally through software, and each image is made up of pixels, which are tiny dots that form the visual elements of the image.

There are a lot of image formats and each have its own structure. Lets take an example JPEG format to understand how images are stored on the disk.

A JPEG image storing will have a process to create header information, Quantization Tables, Huffman Coding, Color Transformations, Block Division, Discrete Cosine Transform (DCT), Quantization, Entropy Encoding (Huffman Coding) & Appending EOI Marker at the end.

When an image is saved, the entire structure, from header information to the compressed and encoded pixel data, is written to the disk. The reverse process occurs during image retrieval, where the file is read, and each step is reversed to reconstruct the image for display or processing.

Terms involved in image storage process

There can be many, but below are the couple of major terms that are used in image storage process

  1. File Formats: Each image is saved in a specific file format, which determines how the data is structured and how the image is compressed. Common image formats include JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), GIF (Graphics Interchange Format), and more.

  2. Pixel Information: The pixels in an image carry information about color and brightness. In a colored image, each pixel is usually represented by a combination of three color channels: red, green, and blue (RGB). The intensity of each channel determines the overall color of the pixel.

  3. Compression: To optimize storage space, images are often compressed. Compression reduces the file size by removing redundant or unnecessary information. However, it's essential to find a balance, as excessive compression can lead to a loss of image quality.

  4. Metadata: Images can also store additional information known as metadata. This includes details such as the camera settings used to capture a photo, the date and time it was taken, and even geolocation data.

  5. File System: The storage of images is organized by the file system on the disk. This system manages how files are named, organized into folders, and accessed by the operating system.

  6. Access and Retrieval: Once stored, images can be accessed and retrieved by applications or the operating system. This is how you can open a photo on your computer or view images on a website.

Understanding the fundamentals of image how an image storage works, provides insights into how the visual content we encounter daily is managed by our devices. As technology continues to advance, so too will the methods of capturing, creating, and storing images, shaping the way we experience the visual world around us.