Convert JPG to WEBP in C#

Native and high performance JPG to WEBP conversion using server side Aspose.Imaging for .NET APIs, without the use of any software like Microsoft or Open Office, Adobe PDF.

 Download Free Trial
Aspose.Imaging for .NET

Aspose.Imagingfor .NET

About Aspose.Imaging for .NET API

Aspose.Imaging API is an image processing solution to create, modify, draw or convert images with in applications. Aspose.Imaging for .NET is a fast API for Image processing, including but not limited to image conversions and manipulations such as drawing, working with graphic primitives, image transformations, export and conversion to multiple formats. Its a standalone library and does not depend on any software for image operations. One can easily add high performance image conversion feature with native APIs within C# .NET projects. These are 100% private on premise APIs and files are processed at your own servers.

Steps for converting JPG to WEBP in C#

A basic conversion with Aspose.Imaging for .NET APIs can be done with just few lines of code. Our APIs are supported on all major platforms and Operating Systems. Before executing the code below, please make sure that you have the following prerequisites on your system.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Application, ASP.NET Web Application
  • Development environment like Microsoft Visual Studio
  • Aspose.Imaging for .NET DLL referenced in your project - Install from NuGet using the Download button above

Aspose.Imaging makes it easy for the developers to convert the JPG file to WEBP in few lines of code.

  • Load the JPG file with Aspose.Imaging for .NET.
  • Call the Save() method and pass the file name (full path) and format (WEBP) as parameter.
  • The WEBP file will be saved at the specified folder (path).
  • Now you can open and use the WEBP file in Microsoft Office, Adobe PDF or any other compatible program.

Save JPG as WEBP - C#

// load the JPG file to be converted
var document = new Aspose.Imaging.Imag.Load("My File.jpg");
// Create Instance of WEBP Options
WebpOptions options = new WebpOptions();
// save JPG as a WEBP
document.Save("Saved File.webp", options);  

JPG to WEBP Live Demos

Convert JPG to WEBP right now by visiting our Live Demos website. The live demo has the following benefits

  • No need to download Aspose API
  • No need to write any code
  • Just upload your JPG file, it will be converted instantly to WEBP and you will get the download link.


About JPG File Format


Read More


About WEBP File Format

WebP, introduced by Google, is a modern raster web image file format that is based on lossless and lossy compression. It provides same image quality while considerably reducing the image size. Since most of the web pages use images as effective representation of data, the use of WebP images in web pages results in faster loading of web pages. As per Google, WebP lossless images are 26% smaller in size compared to PNGs, while WebP lossy images are 25-34% smaller than comparable JPEG images. Images are compared based on the Structural Similarity (SSIM) index between WebP and other image file formats. WebP is a sister project of WebM multimedia container format.

Read More