Image compression how does it work




















News and Special Offers occasional. Image Compression. Techopedia Explains Image Compression. What Does Image Compression Mean? This way one pixel can correspond to hundreds or thousands of pixels.

The image is created and represented using mathematical wavelets. Splitting the image into several parts, each identifiable using a fractal. The quantization is the step where this user information has influence on the result remaining image quality and file size. Reorder and variable length encoding Depending on the quantization, more and more coefficients are reduced to zero. And the probability is very high, that these coefficients with value 0 are found in the higher frequencies rather than in the lower frequencies.

So the data is reordered that way, that the values are sorted by the spatial frequency, first the low frequencies, high frequencies come last. After reordering, it is very likely, that we have some values at the beginning and then a lot of 0. That way, the amount of data is also reduced significantly. The data reduction is done by the subsampling of the color information, the quantization of the DCT-coefficients and the Huffman-Coding reorder and coding.

The user can control the amount of image quality loss due to the data reduction by setting or chose presets. But they take up more space. JPEG, on the other hand, won't fill up your hard drive as fast, but some of the data is lost in the conversion. It should also be noted that converting a lossy photo back to lossless won't restore the photo's data. In order to give the photo an even smaller size, lossy compression discards some parts of a photo. However, this doesn't mean the photo will look bad.

Here are the two main types of lossy compression. Also known as JPEG , this format gets rid of bits and pieces of a photo that you may notice depending upon the level of compression you apply. A normal amount of compression will not be noticeable, while extreme compression may be obvious. There are also other ways a JPG image's quality may be reduced. If you rotate the JPG too much, you'll notice a difference in quality. This is because the photo has to recompress itself with every rotation , losing some data in the process.

There are however programs out there that rotate a JPG losslessly. The same degradation applies if you save a JPG multiple times. GIF compresses files by reducing the number of colors it has. I found a sweet p wallpaper which has roughly 2 million pixels and downloaded it. Checking the properties, I noticed something strange: It only took up KB of space on my hard drive. Why is that? There are different methods, each with a unique approach to a common problem, and each approach being used in different algorithms to reach a similar conclusion.

As a method , lossless compression minimizes distortion as much as possible, preserving image clarity. It does this by building an index of all the pixels and grouping same-colored pixels together. Wherever a particular string of data pixels is used frequently, it replaces all of those pixels with a weighted symbol that further compresses everything. Using this method purely results in an image that is identical to the raw original. The only difference between the two lies in how much space is actually taken up on your hard drive!

As the name implies, lossy compression makes an image lose some of its content. When taken too far, it can actually make the image unrecognizable.



0コメント

  • 1000 / 1000