Creates an object that can be passed to View.SetBackground method to set the background of the Image type. 
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2014 
Syntax
| C# | 
|---|
 | 
| Visual Basic | 
|---|
 | 
| Visual C++ | 
|---|
 | 
Parameters
- imagePath
 - Type: SystemString
File path with the image to be used. 
- flags
 - Type: Autodesk.Revit.DBViewDisplayBackgroundImageFlags
Combination of flags (binary) that control how image is displayed in relation to the view/crop boundary. 
- imageOffsets
 - Type: Autodesk.Revit.DBUV
Horizontal (u) and vertical (v) offsets of the image. 
- imageScales
 - Type: Autodesk.Revit.DBUV
Horizontal (u) and vertical (v) scales of the image (1 == no change). 
Return Value
New background object to pass to View.SetBackground.Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.ExceptionsArgumentException | The file specified by imagePath is not an image file. A valid image file should be in one of the following formats: bmp, jpg, jpeg, png, tif. | 
| Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null | 
| Autodesk.Revit.ExceptionsArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration | 
| Autodesk.Revit.ExceptionsFileArgumentNotFoundException | The file specified by imagePath doesn't exist. |