JpegImage Constructor (Stream)
Initializes a new instance of the JpegImage class.

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

Parameters

stream
Type: System.IOStream
The stream to load image from and initialize pixel and palette data with.
Examples
The example shows how to load a JpegImage from a file stream.
[C#]

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

// Load a JPEG image from a file stream.
using (System.IO.Stream stream = System.IO.File.OpenRead(dir + "sample.jpg"))
{
    using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(stream))
    {
        // Do some image processing.
        // Save to another JPEG file.
        jpegImage.Save(dir + "sample.output.jpg");
    }
}
See Also