Image file formats
Mini-course at ICERM
Arnaud Chéritat

Page *

Back


Raw vs Compressed
There are two kind of bitmap images
Raw images are not common. Sometimes used in photography. Popular ones include(d) BMP, TIFF, RAW. Note that in fact, BMP and TIFF have compression options in their specifications.

Raw images are heavy:

About units of digital file size:

The quasi-totality of images are stored in compressed form in the mass memory (image files in HDD/SSD drives, in data segment of program codes, in data RAM when a program is running) and in raw format in the working memory (data RAM or screen memory RAM).

Mid 2010s: In full HD (1920×1080 pixels), standard color (3 octets par pixels), weights

6 220 800 bytes ≈ 6 MB.
The typical RAM memory of a modern PC is 8GB, so that is a ratio of about 1 to 1300.

Mid 1980s: The inital model of the personnal computer Atari ST had a screen resolution of 320×200 pixels in 16 colours. For 16 colours one needs 4 bits = 1/2 a byte. Hence the raw image used

320×200÷2 = 32 000 bytes = 32 kB.
The machine's RAM was 512KiB~524kB. Ratio: about 1 to 16.

2020's: 8K UHD 7680×4320 = 33 177 600 pixels. If 12 bits per channel one gets

7680×4320×4.5 = 149 299 200 bytes ≈ 150 MB.

There are two kind of compressions

Examples:
Compare zoom on the bird, JPEG (qmax and qhigh) vs PNG.

Compression rates
Bird

The image is 607×471 pixels. High quality photograph with very little noise.

FormatWeightcomp. rate
Raw858 kB1
PNG608 kB1.4
GIF, dithering (lossy!)183 kB4.7
JPEG, max quality (100%)393 kB2.2
JPEG, high quality (78%)53 kB16
Klein

A 4200x4200 pixels image with an 11 colors palette and big areas of uniform colors.

FormatWeightcomp. rate
RAW paletted18 MB1
RAW true color36 MB0.33
PNG500 kB36
GIF632 kB27
JPEG 100%8.2 MB2.2
JPEG 78%2.7 MB6.5

To * page