Compressed size surprises [was: Lossless webp is smaller than lossy webp]

17 views
Skip to first unread message

Pascal Massimino

unread,
Nov 30, 2016, 3:48:03 AM11/30/16
to WebP Discussion
Hi,

On Wed, Nov 23, 2016 at 5:03 PM, Pascal Massimino <pascal.m...@gmail.com> wrote:
Hi Inian,

On Wed, Nov 23, 2016 at 3:54 PM, Inian Parameshwaran <inia...@gmail.com> wrote:
I have hosted a sample image at http://162.243.91.29/icon.png

This is how I am generating my webp images
> cwebp icon.png -o icon.webp
> cwebp -lossless icon.png -o icon-lossless.webp

(original) icon.png = 1760 bytes
(lossy) icon.webp = 704 bytes
(lossless) icon-lossless.webp = 560 bytes
Is this expected behaviour? I had expected lossless size >= lossy size always.

Yes, this is expected (for images with low number of colors, in particular).

You'd get a similar behaviour if you'd try to convert icon.png to a JPEG file instead of PNG.

This has to do with the use of the downsampled YUV420 colorspace, which is well suited for photos, but
less so for low-color sources (=low complexity).

Since this topic (of surprising file size variations) has come up several time,
it probably deserves an entry in the FAQ!


Hope it clarifies things...
skal/

Saurabh Khanduja

unread,
Nov 30, 2016, 4:13:59 AM11/30/16
to webp-d...@webmproject.org
Small typo, I think "Yes, usually went converting" should be "Yes, usually when converting"

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss+unsubscribe@webmproject.org.
To post to this group, send email to webp-d...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.



--
Thanks & Regards,
Saurabh Khanduja
Miles of Smiles

Pascal Massimino

unread,
Nov 30, 2016, 5:00:31 AM11/30/16
to WebP Discussion
On Wed, Nov 30, 2016 at 10:13 AM, Saurabh Khanduja <sau...@roposo.com> wrote:
Small typo, I think "Yes, usually went converting" should be "Yes, usually when converting"

Thanks! corrected.
Reply all
Reply to author
Forward
0 new messages