Making Photos Smaller Without Quality Loss
engineeringblog.yelp.com
engineeringblog.yelp.com
proceeds to explain how they set JPEG quality to 80-85%
I'd be angry, however, if they used the word "lossless", as that implies no _information_ is lost.
Link: https://blogs.dropbox.com/tech/2016/07/lepton-image-compress...
Granted, initial reading of the title might lead you to assume he means "from upload quality", but I don't think it's intentionally misleading.
MozJPEG is a good improvement. But its trellis cost model causes noticeable blurriness on fine details [1]. Compare with the original [2], Guetzli [3] or my Optimage [4].
So, 'Without (Visual) Quality Loss' is such a stretch.
[1] http://i.imgur.com/6naOWSf.jpg [2] http://i.imgur.com/jny5miJ.jpg [3] http://i.imgur.com/gkO2HsP.jpg [4] http://i.imgur.com/GEshKJD.jpg
The real challenge is consistency. Mozjpeg quality is manually tuned here to match the filesize of the rest.
http://code.flickr.net/2015/09/25/perceptual-image-compressi...
As well as other changes to reduce storage costs:
I love these type of endeavors because the ROI is pretty clear. So what's the costs ($$) savings?
Data transfer for a mobile user is not that cheap, thats more important.
(PIL is dead. last release was 10 years back)
"Sorry, you’re not allowed to access this page."
"Contact Yelp if you keep experiencing issues."
Oh well
But it's extremely computationally-intensive, taking over a minute to compress a single web-resolution image on my i7 laptop.
I can't see it being practical in a high-volume server scenario.
In a batch scenario today, one of these could make sense instead of SSIM and/or mozjpeg, but definitely do your own comparisons at equivalent file sizes, required reading: https://kornel.ski/en/faircomparison
We do set a pretty high lower bound to avoid the edge cases inherent in the algorithm and as a result, out of the 30% savings, dynamic quality was only a small portion of that. I wouldn't be surprised that with an offline workload, a more CPU-intensive algorithm can do much better with a lower lower bound.
I found that SSIM scores for images were relatively stable across resolution (same general graph shape, just translated down on the Y-axis). This is mentioned at line 36 of the example dynamic quality code. So we actually generate, compute and compare the SSIMs on much lower resolution candidate images than the final image for speed as well. I'm not sure if this would hold true for something like butteraugli to help open up the possibility for more real-time workloads.
>Progressive JPEG images load from more blurry to less blurry. The progressive option can easily be enabled in Pillow
What is Pillow, Python... hmm... so loading a small version spread out to full size with blur, then in the background loading full size copy to replace blurred small image, that is not progressive loading...?
If I was looking into progressive loading... and implemented a CDN... can this still work? Is it python specific? I use PHP for scripting... maybe an excuse to actually build something with Go rather than the hello world examples. (assuming you can use Go)
Edit: also is progressive loading something that happens once or does a script have to do that every time the photo is pulled?
What is this a support forum? haha calm down kid
(Since you mentioned Chrome and Firefox in another comment, I'm not thinking of browsers that new).
A Python library for manipulating image, like ImageMagick and the like.
> so loading a small version spread out to full size with blur, then in the background loading full size copy to replace blurred small image, that is not progressive loading…?
Progressive JPEG is closer to refinement of previous blocks, it doesn't "add blur", it starts with smaller less precise blocks then refines them. Progressive jpeg actually tends to be smaller than non-progressive (as opposed to e.g. progressive PNG)
> Edit: also is progressive loading something that happens once or does a script have to do that every time the photo is pulled?
There is no script, progressive JPEG is part of the core spec.
I used the blur-up method, low res small file blurred, replace with high res full version without blur.
Thanks for the info. Is it right to assume any photo with a .jpg extension does this by default? I'll go hit the links.