Method Load
Load(string, LoadOptions)
Loads a new image from the specified file.
public static Image Load(string filePath, LoadOptions loadOptions)
Parameters
filePath
stringThe file path to load image from.
loadOptions
LoadOptionsThe load options.
Returns
- Image
The loaded drawing.
Examples
Loads a drawing to process and unloads all related resources when dispose is called
using (var image = Aspose.CAD.Image.Load("fileName.dwg", new LoadOptions
{
UnloadOnDispose = true
}))
{
// process the drawing
}
Load(string)
Loads a new image from the specified file.
public static Image Load(string filePath)
Parameters
filePath
stringThe file path to load image from.
Returns
- Image
The loaded drawing.
Examples
Loads a drawing to process
using (var image = Aspose.CAD.Image.Load("fileName.dwg"))
{
// process the drawing
}
Load(Stream, LoadOptions)
Loads a new image from the specified stream.
public static Image Load(Stream stream, LoadOptions loadOptions)
Parameters
stream
StreamThe stream to load image from.
loadOptions
LoadOptionsThe load options.
Returns
- Image
The loaded drawing.
Examples
Loads a drawing to process from corresponding stream and unloads all related resources when dispose is called
using (var image = Aspose.CAD.Image.Load(File.OpenRead("fileName.dwg"), new LoadOptions
{
UnloadOnDispose = true
}))
{
// process the drawing
}
Load(Stream, string, LoadOptions)
Loads a new image from the specified stream.
public static Image Load(Stream stream, string fileName, LoadOptions loadOptions = null)
Parameters
stream
StreamThe stream to load image from.
fileName
stringThe file name.
loadOptions
LoadOptionsThe load options.
Returns
- Image
The loaded drawing.
Examples
Loads a drawing to process from corresponding stream
string filePath = "C:\\fileName.dgn";
string fileName = "fileName.dgn";
var ms = new MemoryStream(File.ReadAllBytes(filePath);
var image = Image.Load(ms, fileName)
// process the drawing
Load(Stream)
Loads a new image from the specified stream.
public static Image Load(Stream stream)
Parameters
stream
StreamThe stream to load image from.
Returns
- Image
The loaded drawing.
Examples
Loads a drawing to process from corresponding stream
using (var image = Aspose.CAD.Image.Load(File.OpenRead("fileName.dwg"))
{
// process the drawing
}