There are two scenarios for storing pictures as data.
One is a bitmap, also known as a raster diagram.
That is, the image is viewed as a collection of densely spaced points on the plane in a natural optical vision. The light emitted at each point has an independent frequency and intensity, which is reflected in the visual color and brightness. This information has different coding schemes, the most common on the internet is RGB. Depending on your needs, the encoded information can have a different bit (bit) number--bit depth. The higher the number of digits, the clearer the color, the higher the contrast, and the greater the space occupied. The other determines the granularity of the bitmap, which is the number of points. A bitmap file is a collection of all the data that makes up its point, and its size is naturally equal to the number of points multiplied by the bit depth. The bitmap format is a huge family, including Common Jpeg/jpg, GIF, TIFF, PNG, BMP.
The second scenario is a vector diagram.
It looks at the graphics in an abstract way, documenting the patterns shown in them rather than the original data at each point. It sees the image as a combination of "objects", a curve that records the outline of an object, a pattern of a color that describes the pattern inside the object (such as gradients, for example). A photograph, for example, is seen as a combination of various characters and backgrounds. This more advanced perspective is precisely the reflection of human beings in consciousness when they look at the world. Vector Chart formats include CGM, SVG, AI (Adobe Illustrator), CDR (CorelDRAW), PDF, SWF, VML, and more.
Two ways to digitize images