Load

Image.Load method (1 of 4)

Loads a new image from the specified file.

public static Image Load(string filePath, LoadOptions loadOptions)
ParameterTypeDescription
filePathStringThe file path to load image from.
loadOptionsLoadOptionsThe load options.

Return Value

The loaded image.

See Also


Image.Load method (2 of 4)

Loads a new image from the specified file.

public static Image Load(string filePath)
ParameterTypeDescription
filePathStringThe file path to load image from.

Return Value

The loaded image.

Examples

This example demonstrates the loading of an existing Image file into an instance of Aspose.Imaging.Image using file path specified

[C#]

//Create Image instance and initialize it with an existing image file from disk location
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(@"C:\temp\sample.bmp"))
{
    //do some image processing
}

See Also


Image.Load method (3 of 4)

Loads a new image from the specified stream.

public static Image Load(Stream stream, LoadOptions loadOptions)
ParameterTypeDescription
streamStreamThe stream to load image from.
loadOptionsLoadOptionsThe load options.

Return Value

The loaded image.

See Also


Image.Load method (4 of 4)

Loads a new image from the specified stream.

public static Image Load(Stream stream)
ParameterTypeDescription
streamStreamThe stream to load image from.

Return Value

The loaded image.

Examples

This example demonstrates the use of System.IO.Stream objects to load an existing Image file

[C#]

//Create an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\sample.bmp", System.IO.FileMode.Open))
{
    //Create an instance of Image class and load an existing file through FileStream object by calling Load method
    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(stream))
    {
        //do some image processing.
    }
}

See Also