Aspose.Imaging.Examples.CSharp.ModifyingAndConvertingImages.WebPImages.CreatingWebPImage.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:CreatingWebPImage
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_WebPImages();

            // Create an instance of WebPOptions class and set properties
            WebPOptions imageOptions = new WebPOptions();
            imageOptions.Lossless = true;
            imageOptions.Source = new FileCreateSource(dataDir + "CreatingWebPImage_out.webp", false);

            // Create an instance of image class by using WebOptions instance that you have just created.
            using (Image image = Image.Create(imageOptions, 500, 500))
            {
                image.Save();
            }
            // ExEnd:CreatingWebPImage
        }
    }
CreatingWebPImage