PNG format: features, application and reasons for popularity
One of the main tasks facingweb page creators, is fast loading of pages by browsers. And since minimal design is not liked by all users, we have to find a compromise between beautiful design with elegant graphic elements and the speed of the web resource. Previously, in order to reduce the weight of pictures, site developers used either GIF or JPG. Now, more and more often, wordpress uses PNG images. Let's try to understand together why this happens.
Why the PNG-format was invented
What is the PNG format?
To date, twoversion of this algorithm. In the first case, an 8-bit color palette is used, and in the second case, a 24-bit color palette. Photos in PNG-8, in comparison with the GIF-version, differs somewhat better degree of compression and the lack of the ability to create animations. Despite the fact that such an image can contain a maximum of 256 colors, this algorithm is widely used to create graphic text, logos, illustrations with sharp edges and images with gradient transparency. In cases where this is clearly not enough, the developers use the 24-bit PNG-format, which has a lot of additional advantages, such as:
- Improved compression algorithm, which negates any loss of quality.
- The possibility of using alpha transparency provides 256 different levels of transparency.
- The presence of gamma correction, which automatically adjusts the brightness of the picture when playing in different programs.
- Ability to use about 16.7 million color shades.
All this together promotes the use of PNG24 to compress any images containing transparent areas, drawings with a large number of colors and clear boundaries of the image.
Development trend
Despite the fact that the distribution of PNG-formatstill restrained by old browsers, as well as insufficient and incomplete support for the capabilities of this algorithm in new versions, for web graphics PNG is very promising. In comparison with GIF, it has three main advantages: alpha channels, gamma correction and two-dimensional interlacing (the method of progressive display of the image). And compared to JPEG, it has no quality loss. Note that the PNG format was invented on January 4, 1995. Since that time, 18 years have passed, and he began to lead the way in use in websites, pushing GIF to second place.