After converting a bitmap 256-color graphic file into 4-color format, its size has decreased by 18 KB.

After converting a bitmap 256-color graphic file into 4-color format, its size has decreased by 18 KB. What was the original file size in KB?

We solve the problem:
If 256 colors are used, then log (2) 256 = 8 bits is required to store one pixel;
If 4 colors are used then log (2) 4 = 2 bits.
K is the number of image points, hence the file size in the first case is K * 8. And in the second case, K * 2.
18 (KB) = 18 * 1024 * 8 (Bit)
K * 8 = K * 2 + 18 * 1024 * 8
K = 18 * 1024 * 8/6 = 24 * 1024, hence the size of the file: 24 * 1024 * 8 bits = 24 * 1024 * 8 / (1024 * 8) KB = 24 (KB)
Answer: The size of the source file is 24 (KB).



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.