Skip to content

PNG to WebP conversion: some files 10x larger than with cwebp #2766

Discussion options

You must be logged in to vote

@PerplexDaniel I thinkt his would have been better suited as a discussion.

It's likely cwep is using lossy encoding.

I can use the default lossy encoding options with the following code and return a 387Kb image.

using var img = Image.Load(@"C:\Users\james\Downloads\2765.png");

WebpEncoder encoder = new ()
{
    FileFormat = WebpFileFormatType.Lossy
};
img.SaveAsWebp($@"C:\Users\james\Downloads\2765.webp", encoder);

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by PerplexDaniel
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@JimBobSquarePants
Comment options

@PerplexDaniel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2765 on July 09, 2024 07:07.