Skip to content

Adds a WebP format for ImageSharp. Only for encoding images so far.

License

Notifications You must be signed in to change notification settings

karl-sjogren/Shorthand.ImageSharp.WebP

Repository files navigation

Shorthand.ImageSharp.WebP Build Status

Adds support for encoding WebP images using libwebp to ImageSharp.

Why is this needed?

When ImageSharp 2.x encodes transparent images with compression, the file size is larger then even doing lossless webp encoding. This was fixed in ImageSharp 3.x, but with the new license this isn't feasible to all projects. So this makes it possible to encode transparent WebP images properly on ImageSharp 2.0.

Issue: SixLabors/ImageSharp#2332

Usage

If running or deploying on Linux you need to install libwebp-dev.

sudo apt-get update -y && sudo apt-get install -y libwebp-dev

Sample images from Pexels, https://www.pexels.com/sv-se/license/ or https://www.pexels.com/sv-se/creative-commons-images/.

https://www.pexels.com/sv-se/@pok-rie-33563 https://www.pexels.com/sv-se/@naushil-ansari-151720

About

Adds a WebP format for ImageSharp. Only for encoding images so far.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages