Issue 522 in webp: cwebp convert jpg to webp becomes langer file size

16 views
Skip to first unread message

33748… via monorail

unread,
May 21, 2021, 5:49:30 AM5/21/21
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 522 by 33748...@qq.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522

steps reproduces the problem
1.run command: cwebp -q 50 -lossless wk.jpg -o output_jpg.webp -v -progress
2.original file size is 91kb, and becomes 264kb after I used cweb

Except:
I except it's file size becomes smaller, but now becomes lager

Version
cwebp version is 1.2.0

Note:
my origianl image file is below

Attachments:
wk.jpg 89.3 KB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

jz… via monorail

unread,
May 21, 2021, 4:42:20 PM5/21/21
to webp-d...@webmproject.org
Updates:
Status: Invalid

Comment #1 on issue 522 by jz...@google.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522#c1

The source image is compressed with lossily with jpeg, lossless compression will struggle with the artifacts created from it. If the source image is a png, webp lossless should do better than it.

In this case you should remove -lossless. With the defaults I see a final size of ~31K. -q 50 will bring it to ~24K, but it's up to you how much additional degradation you want to introduce.

pasca… via monorail

unread,
May 22, 2021, 3:19:06 AM5/22/21
to webp-d...@webmproject.org

Comment #2 on issue 522 by pasca...@gmail.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522#c2

This is indeed not specific to WebP format, but to any conversion from lossy to lossless format. You would get similar size inflation if you were to recompress your original JPG to a PNG.

33748… via monorail

unread,
May 23, 2021, 11:12:06 PM5/23/21
to webp-d...@webmproject.org

Comment #3 on issue 522 by 33748...@qq.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522#c3

thank you guess,and I want to know if only png and webp support lossless compression,and only png and webp should use -lossless 。

jz… via monorail

unread,
May 24, 2021, 2:04:51 PM5/24/21
to webp-d...@webmproject.org

Comment #4 on issue 522 by jz...@google.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522#c4

I'm not sure I understand the question. If you're interested in other lossless codecs wikipedia has a list of some examples [1].
If you have other questions about image compression please feel free to send them to webp-d...@webmproject.org.

[1] https://en.wikipedia.org/wiki/Lossless_compression#Raster_graphics

33748… via monorail

unread,
May 25, 2021, 12:16:54 AM5/25/21
to webp-d...@webmproject.org

Comment #5 on issue 522 by 33748...@qq.com: cwebp convert jpg to webp becomes langer file size
https://bugs.chromium.org/p/webp/issues/detail?id=522#c5

Alright.
Reply all
Reply to author
Forward
0 new messages