Lably
Skip to content

Image file format

Standardized means of organizing and storing digital images

  • 14 min read
  • 3 chapters

Related on Lably

Through File format, Image and Algorithm

Raster formats are for 2D images. A 3D image can be represented within a 2D format, as in a stereogram or autostereogram, but this 3D image will not be a true light field, and thereby may cause the vergence–accommodation conflict.

Image files are composed of digital data in one of these formats so that the data can be displayed on a digital (computer) display or printed out using a printer. A common method for displaying digital image information has historically been rasterization.

Image file sizes

The size of raster image files is positively correlated with the number of pixels in the image and the color depth (bits per pixel). Images can be compressed in various ways, however. A compression algorithm stores either an exact representation or an approximation of the original image in a smaller number of bytes that can be expanded back to its uncompressed form with a corresponding decompression algorithm. Images with the same number of pixels and color depth can have very different compressed file sizes. Considering exactly the same compression, number of pixels, and color depth for two images, different graphical complexity of the original images may also result in very different file sizes after compression due to the nature of compression algorithms. With some compression formats, images that are less complex may result in smaller compressed file sizes. This characteristic sometimes results in a smaller file size for some lossless formats than lossy formats. For example, graphically simple images (i.e., images with large continuous regions like line art or animation sequences) may be losslessly compressed into a GIF or PNG format and result in a smaller file size than a lossy JPEG format.

For example, a 640 × 480 pixel image with 24-bit color would occupy almost a megabyte of space:

640 × 480 × 24 = 7,372,800 bits = 921,600 bytes = 900 KiB

With vector images, the file size increases only with the addition of more vectors.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication