martedì 29 aprile 2014

JPEG compression myths and legends

I feel like I wrote this after reading a few days ago the 11 most popular urban legends about photography on the popular clickblog.it
Well I think some of the arguments in support of or against the legends underground are very weak and easily attacked.
What most struck me as absurd is that of compression algorithm Jpg Jpeg or, if you prefer. Where it is reported that repeatedly save an image as a JPG is not so harmful. As we all surely know the acronym JPG or JPEG stands for Joint Photographic Expert Group by the name of the team which was invented and then improved, you will also know that it is a lossy format and then from right to have this urban legend and not the author Article on clickblog.
I'd like to delve a little 'argument analyzing what steps are performed when saving to JPG or JPEG and then see where indicated and where no such file.When you choose to save is first sampled the image with square from 8 px from the side, at this point the function is applied DCT discrete cosine transformation.
Do not commit in speeches too complicated, but the function in question is similar to the Fourier transform for those who had never heard of. Both extract a signal from another signal which represents the frequency spectrum.Simply put the resulting function does not point out which colors are present in the square but it describes how they change and how often.Well here comes the medicine that tells us how the human eye is insensitive to variations in color between two points if they are less than a certain threshold. This allows us to cut all minor variations of a certain amount (this corresponds to a flattening of color that is supposed to the eye and is not known at this point that there is loss of quality), then using the Huffman coding is storing the color of each pixel using the least amount of memory as possible. If we wanted to make an example algorithm JPG is a little 'what makes an audio filter with the music that passes or not certain sound frequencies.When we save an image in JPG there is in fact required to compress the image on a scale from 0 to 100. More we set a large value will be truncated less the low color variations.We take into account that the algorithm Rescue JPG is designed to give the best results around 80-90%. Use higher values ​​does not make sense because you have a low reduction in the size of the file, and then the damage caused by the JPG, which still runs, are greater than the benefits, otherwise fall below 80% greatly reduces the file size but begin to see the blockiness due to the algorithm.After all these words you've probably realized that save an image repeatedly using this method gets worse every time you save the image quality.The JPG has been designed to be used in images such as photos, use of images containing geometric shapes with sharp edges or texts is not the best thing we can do just because there are color changes too the net being cut are no longer accurate as in origin.








Nessun commento:

Posta un commento