public static void Run()
{
// ExStart:ExportToWebP
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_WebPImages();
// Create an instance of image class.
using (Image image = Image.Load(dataDir + "SampleImage1.bmp"))
{
// Create an instance of WebPOptions class and set properties
WebPOptions options = new WebPOptions();
options.Quality = 50;
options.Lossless = false;
image.Save(dataDir+ "ExportToWebP_out.webp", options);
}
// ExEnd:ExportToWebP
}
}