File Format


The degree of compression of a file is determined each time designer based on his needs, but the optimal ratio razmerkachestvo image compression rate is equal to 65. Gif format is best suited for images of small size, where transparency is needed (Alpha), and for animated bitmaps. Compression algorithm, the format is based on the fact that the image is given a fixed color palette (from 2 to 256 colors), and all similar shades of discarded or replaced neighboring colors. Also, the algorithm calculates the image lines – left to right, and stores are not on every pixel separately, and counts how many pixels are the same color in a row, and stores information only about color and number of pixels. This significantly reduces the weight of the file. Details can be found by clicking Secretary of Agriculture or emailing the administrator. It is easy to see that the vertical gradient (top-down) will weigh in this case is much smaller than the gradient of the horizontal (left to right).

This follows consider when creating images, especially when you create animated banners, where the weight is composed also of the number of frames and is literally a war for each byte. Png format is rarely used. It differs from the format to gif that png to preserve more information about the file. In particular, information on the alpha channel. In gif format each individual pixel can be either completely transparent or completely opaque. This imposes restrictions on Use clear transitions to transparency, because of what gif files with transparency often look "jagged" edges. However, due to the large weight png files, they practically do not use, and apply a variety of visual tweaks in format gif, in particular the addition of the "transitional" pixels at the edges of the image.