Is there a way to save an uncompressed image with libwebp?

154 views
Skip to first unread message

foogle

unread,
Nov 24, 2022, 7:41:34 PM11/24/22
to WebP Discussion
When I save an uncompressed PNG of 1920x1080 size, it is about 8MB total size.

I am trying to do the same with libwebp but cannot manage to get files of anything like that size.

The reason I am trying to do this is performance.  I am wanting to do webp encoding with no compression at all, because compression is very CPU intensive.  I don't care the size, I am wanting the very fastest possible webp encoding.

Any suggestions?

thanks

John Hobson

unread,
Nov 24, 2022, 9:16:49 PM11/24/22
to webp-d...@webmproject.org
I suppose there's a format or parameters to set for no compression, but you could easily invent your own: a few bytes of metadata at the start (pixel width, height, bytes/pixel, RGBwhatever, then followed by your raw data.

--
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...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/e979fe09-fc70-4224-a515-1471e16f7ce2n%40webmproject.org.


--
John



 

Vincent Rabaud

unread,
Nov 25, 2022, 4:47:28 AM11/25/22
to webp-d...@webmproject.org
If you want no compression, you can go with https://en.wikipedia.org/wiki/Netpbm#File_formats or https://en.wikipedia.org/wiki/BMP_file_format
WebP does not allow that feature, it always compresses using the WebP format.
With cwebp, you can speed up compression by using the flags "-m 0 -mt" (no effort and multi-threading) for lossy or ("-z 0 -mt) with lossless.

Reply all
Reply to author
Forward
0 new messages