Do you want to learn how do we store images, songs, or movies in the memory? If yes, then the most important point to keep in mind that we can not store any of the mentioned files in the memory. The memory of a given system never stores any image, song, or movie inside it. The thing it stores is millions of 0s and 1s of various combinations.
So, how the images, songs, or videos are converted into 0s and 1s? Do we convert this and how just by hitting on the capture button to capture an image; all the processes and conversion takes place. What’s the logic behind this?
It is impossible for any human being to do such conversion in the time same as used for blinking the eyes. Let’s see the scenes behind the camera considering the situation of “taking a picture of a picture of a girl using a camera as shown below.”
When you open the camera the screen divides into rows and columns and gives a small intersection known as pixels (picture elements) of rectangular shape and when you hit the capture button, memory stores colors of every pixel as shown in the figure below.
How memory stores color?
Memory can not store color by its name like blue, black, white, peach, and so on. There is a particular number assigned for each color.
So, if memory stores the color of each pixel then how many pixels should be present there, and how many bits it consists of?
Let’s say when you open the camera to take the picture, the screen divides only into 4 parts i.e. 4 pixels and having a single bit for black and white only. Just imagine how that picture will look like! It will not even feel like that the picture is of a girl. Now, suppose that there are 2000 pixels and having 4 bits. Now, imagine, how pictures will look like! It will be something similar to cartoons cause that girl and background not only consists of different colors instead they also contain various shades of different colors.
So, it clearly states that the higher the number of pixels implies to smaller the size of it and the more perfect and high-quality image you will get. An image with a resolution of 1024by 798 pixels has 1024*798 pixels (817,152 pixels). Each pixel typically consists of 8 bits (1 byte) for a black and white (B & W) image or 24 bits (3 bytes) for a color image; one byte each for red, green, and blue. 8 bits represents 2^8 =256 tonal levels( 0- 255).
Ultimately, it can be concluded that memory does not store images. It stores a million combinations of 0s and 1s (pixel) in a pattern. For songs or movies, memory stores millions of patterns of those pixels. And when we transfer files from one device to another device it does not share any image, songs, or movies; instead, it transfers those million patterns of pixels. Due to a single pattern in the image its file size wraps in KB or a few MB. But large numbers of patterns constitute a song or movie results in large file size and takes more time to transfer as compare to image.