8
$\begingroup$

I would like to know what is the Compression Algorithm used by Facebook for compressing the images? I uploaded a image of size 242 Kb and I downloaded the same image from my Facebook album. The size of downloaded image is 46 Kb and the subjective quality is similar, I wasn't able to differentiate between the original (uploaded) and downloaded (from Facebook) image. The downloaded image was downsampled though, from 1226 x 1600 to 552 x 720. So Facebook compresses the image at a good ratio while we are uploading it to our Facebook account without affecting the subjective quality much.

I wonder what compression algorithm they are using for this purpose. What would be your best guess?

                           Original image: tamil_girl_painting (size 1226 x 1600)

Original Image

                  Downloaded (from Facebook) image: tamil_girl_painting (size 552 x 720)

Compressed Image

$\endgroup$
  • 1
    $\begingroup$ I'll bet it is proprietary. $\endgroup$ – John Jan 23 '14 at 11:37
  • 1
    $\begingroup$ Ask Mark Zuckerburg I am sure he will tell you. :P $\endgroup$ – Tarin Ziyaee Jan 23 '14 at 12:40
  • 3
    $\begingroup$ Well, if it were proprietary, your browser would not be able to display it! Probably just a lower quality of JPEG... Maybe you could post your original file and the download from facebook? $\endgroup$ – pichenettes Jan 23 '14 at 13:04
  • 3
    $\begingroup$ I would suggest vanilla JPEG. At the very best JPEG + a fancy perceptual diff in the loop to see how low they can go with the quality settings without hurting much a perceptual quality score... But I doubt they would bother doing that. $\endgroup$ – pichenettes Jan 23 '14 at 13:45
  • 1
    $\begingroup$ @JasonR Just now I checked.. Yes the image has been downsampled.. Original Image dim: 1226 x 1600 and the downloaded image dim: 552 x 720 .. $\endgroup$ – Premnath D Jan 24 '14 at 3:47
6
$\begingroup$

From the images you posted its quite clear that the image has been downsampled and re-compressed with lower quality jpeg settings. If you look round the mouth you can clearly see JPEG-like artefacts.

$\endgroup$
  • $\begingroup$ I too think so.. I uploaded different file formats i.e) tiff, png etc and all were converted to JPEG.. I couldn't able to save them in any format other than JPEG. Is there any other algorithm more efficient than JPEG?? Why JPEG2000 is not widely used? $\endgroup$ – Premnath D Jan 24 '14 at 13:07
  • $\begingroup$ I believe JPEG2000 is minimally used because it is encumbered by patents. $\endgroup$ – John Jan 24 '14 at 16:23
  • 1
    $\begingroup$ @PremnathD: jpeg2000 is covered by patents, yes, but AFAIK the baseline jpeg2000 stuff can be used royalty-free. Thing is, JPEG2000 support is weak and it's a more complex format. Basically, the old JPEG is "good enough". And if you want to squeeze out some further bits, it's worth downsampling the image before it looks too blocky -- which is apparently what Facebook does $\endgroup$ – sellibitze Jan 27 '14 at 15:46
  • $\begingroup$ TBH JPEG 2K is only really worth it when you go to extreme compression levels. Unfortunately when you go to such levels the quality loss is already so bad as to not make it worthwhile. I've used a similar wavelet compression to have 100+:1 compression but I really wasn't all that worried by the artefacts ... $\endgroup$ – Goz Jan 27 '14 at 21:35
2
$\begingroup$

ImageMagick's "identify -verbose" says it's JPEG. The sample image here has quality 77, while several recent ones of mine that I checked just now have either "quality 71" or "quality 74". All of them have 2x downsampling of the chroma channels. Most of the time I have uploaded high-quality (IJG quality 92) JPEGs without donwsampling.

Some have Facebook's "tinysrgb" profile while others have one of the color.org sRGB profiles. I haven't yet figured out how these choices are made, or how to influence them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.