Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.21
Interoperation between LEADTOOLS and Windows Presentation Foundation (WPF) images.

The RasterImageMediaConverter class provides methods to convert a RasterImage object to and from an ImageSource.

The RasterImageMediaConverter.ConvertFrom method will convert a RasterImage object to a WPF ImageSource. The flags in the RasterImageMediaConverterFromFlags enumeration can be used to control the conversion operation.

The RasterImageMediaConverter.ConvertTo method will convert a WPF ImageSource object to a RasterImage. The flags in the RasterImageMediaConverterToFlags enumeration can be used to control the conversion operation.

The conversion works by copying the image data over to the new destination. Currently, there is no support for sharing memory between a RasterImage and an ImageSource.