Skip to main content

ImageSource Class

An object that stores a specified image.

Namespace: DevExpress.XtraPrinting.Drawing

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

[TypeConverter(typeof(ImageSourceTypeConverter))]
public class ImageSource :
    IDisposable,
    ICloneable

Remarks

Create an ImageSource object to store an image. This object can store an image of the DevExpress.Drawing.DXImage and SVG image types. To pass an image, use one of the following methods:

Method Description
ImageSource(SvgImage svgImage) constructor Creates an ImageSource object and sets its ImageSource.SvgImage property to the image passed as a parameter.
ImageSource(DXImage image) constructor Creates an ImageSource object and sets its ImageSource.Image property to the image passed as a parameter.
FromFile(string filename) static method Creates an ImageSource object and specifies its ImageSource.SvgImage or ImageSource.Image property depending on the image stored in the specified file.

An ImageSource object stores either an SVG or DevExpress.Drawing.DXImage type image. Use the ImageSource object’s properties to get an image. When one of these properties is specified, the others are set to null:

ImageSource.Image
Returns an image.
ImageSource.SvgImage
Returns an SVG image.

Tip

Call the DXImageExtensions.ConvertToGdiPlusImage(DXImage) method to obtain the System.Drawing.Image instance from the DXImage object.

Inheritance

Object
ImageSource
See Also