WebP is a modern and widespread image file format to showcase high-quality images without affecting website performance. This format is supported by most of the web browsers.
In DsImaging, you can load WebP images using Load method of the GcBitmap class wherein you can load images from file, stream and byte arrays. You can also load an image by using constructor of the GcBitmap class. For details about loading images, see Load Image.
To save an image to the WebP format, you can use SaveAsWebp method of the GcBitmap class.
C# |
Copy Code
|
---|---|
// Converting a JPG image to WEBP format using var bmp = new GcBitmap(); bmp.Load("image.jpg"); bmp.SaveAsWebp("image.webp", null, false, 50); |
Limitations