WebPImage Constructor (Stream)
Initializes a new instance of the WebPImage class from stream.

Namespace: Aspose.Imaging.FileFormats.Webp
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 21.04
Syntax
public WebPImage(
	Stream stream
)

Parameters

stream
Type: System.IOStream
The stream WebP image.
Examples
This example shows how to load a WebP image from a file stream and save it to PNG.
[C#]

string dir = "c:\\temp\\";

// Load a WebP image from a file stream.
using (System.IO.Stream stream = System.IO.File.OpenRead(dir + "test.webp"))
using (Aspose.Imaging.FileFormats.Webp.WebPImage webPImage = new Aspose.Imaging.FileFormats.Webp.WebPImage(stream))
{
    // Save to PNG
    // Note that only the active frame will be stored to PNG, since PNG is not a multi-page format.
    webPImage.Save(dir + "test.output.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
See Also