How the PNG file works

Asked

Viewed 310 times

0

I was looking at this picture inserir a descrição da imagem aqui and she has 8,21 KBs(8210 Bytes), its size is 100x100px, totalling 10.000 pixeis. So every (8210 / 10000) 0.821 Byte it can save position and color.

How is it done ??

1 answer

2


There is not only 256-color PNG, there are 24bit and 32bit PNG images and they are not only composed of pixels, but are composed of several layers (filters), so your calculation is not correct, colors can also represent different weights.

Note that an image, even 256 colors being wider than another image however lower at the same time can weigh less, even if the "ratio" of the image remains relatively.

Depending on the color scale, one image identical to another (both being PNG) can weigh much more, so much so that there are techniques, software and services that are made to optimize png files to the maximum without losing the visual quality of the image, examples:

An article explaining the operation of filters and compression:

Specifications:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.