For a project I'm working on (master thesis), I need to figure out what is facebook's image compression algorithm.
The goal: to be able to mimic facebook's image compression locally (using python).
Note: If the images I uploaded with the link seem unavailable, please refresh the page! :)
After searching for a while, I could not find a recent and clear answer to my question.
I tried to run the compressed image through ImageMagick's
identify. It tells me that it is a JPEG compression (DCT progressive + Huffman) with a quality of 85. But when I try to do my own compression using python, the result is not the same.
Here is my code:
from PIL import Image img = Image.open('original.jpg') img.save('output.jpg', optimize=True, quality=85, progressive=True)
Do you have any ideas or resources that could help me? I'm running out of ideas. Thank you!